02-20-2017
03:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-20-2017
03:24 AM
Hi
Therefore:
Try this.
' Set a reference to the assembly document.
' This assumes an assembly document is active.
Dim oDoc As AssemblyDocument
oDoc = ThisApplication.ActiveDocument
' Set a reference to the BOM
Dim oBOM As BOM
oBOM = oDoc.ComponentDefinition.BOM
oBOM.StructuredViewFirstLevelOnly = False
oBOM.StructuredViewEnabled = True
Dim oStructuredBOMView As BOMView
oStructuredBOMView = oBOM.BOMViews.Item("Structured")
Call oStructuredBOMView.Sort("Stock Number",True)
Call oStructuredBOMView.Renumber(1, 1)
MessageBox.Show("Done", "Sort BOM")
Reg
2025.2
2025.2