
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Set oSheet = oDrawDoc.ActiveSheet
Dim oDrawingView As DrawingView
Set oDrawingView = oSheet.DrawingViews(1)
Dim oAssydoc As AssemblyDocument
Set oAssydoc = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument
Dim oBOM As BOM
Set oBOM = oAssydoc.ComponentDefinition.BOM
oBOM.StructuredViewEnabled = True
oBOM.StructuredViewFirstLevelOnly = False
Dim oBOMView As BOMView
Set oBOMView = oBOM.BOMViews.Item("Structured")
Call oBOMView.Sort("BOM Structure", True, "Part Number", True, , True)
'
The above line not working properly, It sorts only the first a criteria i.e. BOM Structure. And if change the first one to Part Number the only the part number will work. At any point of time only the first sorting criteria is working.
Solved! Go to Solution.