Option Explicit
Sub Example()
    Dim objApplication As SolidEdgeFramework.Application
    Dim objTCE As SolidEdgeFramework.SolidEdgeTCE
    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
    Set objApplication = GetObject(, "SolidEdge.Application")
    Set objTCE = objApplication.SolidEdgeTCE
    itemID = "1"
    revID = "A"
    revRule = "Latest Working"
    nCount = 0
    bDeepList = False
    Call objTCE.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
    If Not objApplication Is Nothing Then
        Call objApplication.Quit
    End If
    
    Set objTCE = Nothing
    Set objApplication = Nothing
End Sub