Private Sub Command1_Click()
On Error Resume Next
Dim objApplication As SolidEdgeFramework.Application
Dim objSolidEdgeInsightXT As SolidEdgeFramework.SolidEdgeInsightXT
Set objApplication = GetObject(, "SolidEdge.Application")
Set objSolidEdgeInsightXT = objApplication.SolidEdgeInsightXT
Dim nCount As Long
Dim ubnd As Integer
Dim ifileSpec As Integer
Dim ItemRevIds As Variant
Dim fileSpecs As Variant
Dim itemID As String
Dim revID As String
Dim revRule As String
Dim bDeepList As Boolean
itemID = 1
revID = A
revRule = "Latest Working"
nCount = 0
bDeepList = False
Call objSolidEdgeInsightXT.GetBomStructure(itemID, _
revID, _
revRule, _
bDeepList, _
nCount, _
ItemRevIds, _
fileSpecs)
'nCount = Number of components in the BOM structure.
If nCount > 0 Then
ubnd = UBound(fileSpecs)
For ifileSpec = 0 To ubnd
'fileSpecs(ifileSpec, 0): FileName of the component
'fileSpecs(ifileSpec, 1): number of occurrences of the component
Next
ubnd = UBound(ItemRevIds)
For ifileSpec = 0 To ubnd
'ItemRevIds(ifileSpec, 0) = ItemID of the component
'ItemRevIds(ifileSpec, 1) = RevID of the component
Next
End If
Set objSolidEdgeInsightXT = Nothing
Set objApplication = Nothing
End Sub