Message 1 of 2
Rearrange Assembly BOM (Structured) Columns/Titles using iLogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good day everyone.
I'm currently busy making an external rule that will export my assembly to an Excel document with a bunch of small changes.
Currently I'm stuck at the point were I want to "Rearrange" the columns I have active in the "Structured" part of the BOM.
What I want to achieve here is that the "Structured" columns/titles should only consist out of the following headers:
• Item
• Part Number
• Filename
• Component Type
• Material
Here is my code that I have this far:
' To check if current open document (Active document) is an assembly. (.iam) - Returns a 'true' or 'false' value. IsAssembly = ThisApplication.ActiveDocument.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject ' If is .iam then make changes to the BOM Structure. If IsAssembly = True Then Dim AssyDoc As AssemblyDocument = ThisApplication.ActiveDocument Dim AssyBom As BOM = AssyDoc.ComponentDefinition.BOM AssyBom.StructuredViewEnabled = True AssyBom.StructuredViewFirstLevelOnly = False AssyBom.StructuredViewDelimiter = "." AssyBom.HideSuppressedComponentsInBOM = True AssyBom.RenumberItemsSequentially = True AssyBom.SetPartNumberMergeSettings2(False) ' Here I want the rule to rearrange the the titles of the Structured BOM. Else MessageBox.Show("Active document is NOT an assembly.", "BOM Check") End If
I'm still learning a lot of new things in regards to using iLogic, and I appreciate all the help.
Current version of Inventor is 2023.