Solid Edge Framework Type Library
GetBomStructure Method
Specify the ItemID of the Item.
Specify the RevID of the Item.
Boolean for generating BOM. If FALSE then function returns first level BOM structure and if TRUE then function returns deep level BOM structure.
Number of components in the BOM structure.
2D Array of ItemID and RevID of the components.
2D Array of fileSpec and number of occurrences of the components.
Description
Returns the BOM Structure for the input ItemRev from the server
Syntax
Visual Basic
Public Sub GetBomStructure( _
   ByVal bstrItemId As String, _
   ByVal bstrItemRevId As String, _
   ByVal bstrRevisionRule As String, _
   ByVal bDeepList As Boolean, _
   ByRef NoOfComponents As Long, _
   ByRef ListOfItemRevIds As Variant, _
   ByRef ListOfFileSpecs As Variant _
) 
Parameters
bstrItemId
Specify the ItemID of the Item.
bstrItemRevId
Specify the RevID of the Item.
bstrRevisionRule
bDeepList
Boolean for generating BOM. If FALSE then function returns first level BOM structure and if TRUE then function returns deep level BOM structure.
NoOfComponents
Number of components in the BOM structure.
ListOfItemRevIds
2D Array of ItemID and RevID of the components.
ListOfFileSpecs
2D Array of fileSpec and number of occurrences of the components.
Remarks
This function will be used to get the BOM structure of the particular assembly on the server. The function returns the total number of components, array of ItemID and RevID of the components and array of fileSpec and number of occurrences of the components present on the server. This function also provides the functionality of getting one level or deep level BOM structure.
Example
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
See Also

SolidEdgeInsightXT Object  | SolidEdgeInsightXT Members  | Solid Edge ST4 - What's New