§Sub GetBOMItemData()
§ ' get symbol
library object
§ Dim symMgr As McadSymbolBBMgr
§ Set symMgr =
Application.GetInterfaceObject("SymBBAuto.McadSymbolBBMgr")
§
§ ' get BOM
manager
§ Dim symBOMMgr As McadBOMMgr
§ Set symBOMMgr =
symMgr.BOMMgr
§
§ ' get the
BOM table in the drawing
§ Dim symBOM As McadBOM
§ Set symBOM =
symBOMMgr.GetBOMTable(ThisDrawing.ModelSpace, "")
§
§ ' iterate
through the item s in the BOM ...
§ Dim symBOMItem As McadBOMItem
§ For Each symBOMItem In symBOM.Items(True)
§ Dim varData As Variant
§ varData =
symBOMItem.Data
§
§ ' ... and
print their data values
§ Debug.Print "Row
with item number: " & symBOMItem.ItemNumber
§ Dim i As Integer
§ For i =
LBound(varData) To UBound(varData)
§ Debug.Print " " & varData(i, 0) & " =
" & varData(i, 1)
§ Next
§ Next
§End
Sub