Sheet metal Browser Folders

Sheet metal Browser Folders

Curtis_Waguespack
Consultant Consultant
495 Views
3 Replies
Message 1 of 4

Sheet metal Browser Folders

Curtis_Waguespack
Consultant
Consultant

Doe anyone know how to access the Folded Model node in a sheet metal part, or how to find browser folders in a sheet metal part?

 

When I run this bit of code it comes back empty when looking for browser folders when the part is a sheetmetal part.

 

 

Dim oDoc As Document	
oDoc = ThisApplication.ActiveDocument


'For Each Pane In oDoc.BrowserPanes
'	oMsg = oMsg & vbLf & "Pane Name: " & Pane.name
'Next
'oMsg = oMsg & vbLf & "--------"

Dim oPane As BrowserPane
oPane = oDoc.BrowserPanes.Item("Model")

Dim oTopNode As BrowserNode 
oTopNode = oPane.TopNode

oMsg = oMsg & vbLf & "Folder Count: " & oPane.TopNode.BrowserFolders.Count 


For Each oFolder In oPane.TopNode.BrowserFolders
	oMsg = oMsg & vbLf & "Folder Name: " & oFolder.name
Next

MessageBox.Show(oMsg, "ilogic")

 

standard part

 

Curtis_W_0-1622671167970.png

 

same part converted to sheet metal

Curtis_W_1-1622671191561.png

 

EESignature

0 Likes
Accepted solutions (2)
496 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Dim oDoc As Inventor.PartDocument	
oDoc = ThisApplication.ActiveDocument

Dim c As Inventor.SheetMetalComponentDefinition = oDoc.ComponentDefinition


'For Each Pane In oDoc.BrowserPanes
'	oMsg = oMsg & vbLf & "Pane Name: " & Pane.name
'Next
'oMsg = oMsg & vbLf & "--------"

Dim oPane As BrowserPane
oPane = oDoc.BrowserPanes.Item("Model")

Dim oTopNode As BrowserNode 
oTopNode = oPane.TopNode

oMsg = oMsg & vbLf & "Folder Count: " & oPane.TopNode.BrowserNodes.Item(1).FullPath


For Each oFolder In oPane.TopNode.BrowserNodes.Item(1).BrowserFolders
	oMsg = oMsg & vbLf & "Folder Name: " & oFolder.name
Next

MessageBox.Show(oMsg, "ilogic")

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 4

bradeneuropeArthur
Mentor
Mentor
Accepted solution

or even Better:

Dim oDoc As Inventor.PartDocument	
oDoc = ThisApplication.ActiveDocument

Dim c As Inventor.SheetMetalComponentDefinition = oDoc.ComponentDefinition


'For Each Pane In oDoc.BrowserPanes
'	oMsg = oMsg & vbLf & "Pane Name: " & Pane.name
'Next
'oMsg = oMsg & vbLf & "--------"

Dim oPane As BrowserPane
oPane = oDoc.BrowserPanes.Item("Model")

Dim oTopNode As BrowserNode 
oTopNode = oPane.TopNode

oMsg = oMsg & vbLf & "Folder Count: " & oPane.TopNode.BrowserNodes.Item("Folded Model").FullPath


For Each oFolder In oPane.TopNode.BrowserNodes.Item("Folded Model").BrowserFolders
	oMsg = oMsg & vbLf & "Folder Name: " & oFolder.name
Next

MessageBox.Show(oMsg, "ilogic")

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 4 of 4

Curtis_Waguespack
Consultant
Consultant

Thanks! 

 

I'm certain I tried getting the 'Folded Model' node by name, but I must have had something not right 🙃

 

Here's what I ended up with in case it helps someone in the future.

 

 

Dim oDoc As Inventor.PartDocument	
oDoc = ThisApplication.ActiveDocument

Dim oPane As BrowserPane
oPane = oDoc.BrowserPanes.Item("Model")

Dim oTopNode As BrowserNode 
oTopNode = oPane.TopNode

Dim oTargetNode As BrowserNode 
If oDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then 
	oTargetNode = oPane.TopNode.BrowserNodes.Item("Folded Model")
Else
	oTargetNode = oTopNode
End If

oMsg = oMsg & vbLf & "Folder Count: " & oTargetNode.BrowserFolders.Count 

For Each oFolder In oTargetNode.BrowserFolders
	oMsg = oMsg & vbLf & "Folder Name: " & oFolder.name
Next

MessageBox.Show(oMsg, "ilogic")

 

EESignature