06-22-2023
07:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-22-2023
07:28 AM
Hi @tcaG6GZK
See this updated example.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim oSelected As ObjectCollection oSelected = ThisApplication.TransientObjects.CreateObjectCollection For Each oItem In ThisDoc.Document.SelectSet If oItem.Type = ObjectTypeEnum.kBrowserFolderObject Then oSelected.Add(oItem) Next 'Check that at least 1 is selected If oSelected.Count = 0 Then MsgBox("no folder selected", , "iLogic") Exit Sub 'exit rule End if oPane = ThisApplication.ActiveDocument.BrowserPanes("Model") For Each oItem In oSelected oFolder = oPane.TopNode.BrowserFolders.Item(oItem.name) For Each oNode As BrowserNode In oFolder.BrowserNode.BrowserNodes oComp = oNode.NativeObject oComp.BOMStructure = BOMStructureEnum.kDefaultBOMStructure 'remove BOMStructure override if present oComp.Definition.BOMStructure = BOMStructureEnum.kPurchasedBOMStructure Next Next