I've been trying to Sorting the Bom List as Fig.Shows below
Now I want to Extract Array e.g. Item[ CountedRows], PartNumber[]...
I've Checked the admapi.chm couldn't get more hints
If you got any clue Welcome to discuss it !
Sub Main()
Dim oAsmDoc As AssemblyDocument
Dim oAsmCompDef As AssemblyComponentDefinition
Dim oBOMView As BOMView
oAsmDoc = ThisDoc.Document
oAsmCompDef = oAsmDoc.ComponentDefinition
Try
oBOMView = oAsmCompDef.BOM.BOMViews.Item("Structured")
Catch
oAsmCompDef.BOM.StructuredViewEnabled = True
oBOMView = oAsmCompDef.BOM.BOMViews.Item("Structured")
End Try
Try
oBOMView.Sort("物料清单类型(First Field)", True, "Part Number", True ,)
oBOMView.Renumber()
Catch
MsgBox("Missing Fields, Fix it!(inner-line 83126)", vbOKOnly, "Error")
Exit Sub
End Try
End Sub