Solid Edge Framework Type Library
GetBomStructureUsingKeyProperties Method
It is a two-dimensional array which will take Key Properties and their values as input.
Specify the item-rev as string.
Specify the item-type as string.
pecify the Revision Rule for which results are to be fetched.
Boolean for generating BOM. If FALSE then function returns first level BOM structure and if TRUE then function returns deep level BOM structure.
This parameter will return the number of components in the BOM structure.
2D Array of ItemID and RevID of the components.
2D Array of file specification and number of occurrences of the components.
Description
Returns the BOM Structure for the input ItemRev from the server using Key Propeties
Syntax
Visual Basic
Public Sub GetBomStructureUsingKeyProperties( _
   ByRef pvarMFKAttrInfo As Variant, _
   ByVal bstrItemRevId As String, _
   ByVal bstrItemType As String, _
   ByVal bstrRevisionRule As String, _
   ByVal bDeepList As Boolean, _
   ByRef NoOfComponents As Long, _
   ByRef ListOfItemRevIds As Variant, _
   ByRef ListOfFileSpecs As Variant _
) 
Parameters
pvarMFKAttrInfo
It is a two-dimensional array which will take Key Properties and their values as input.
bstrItemRevId
Specify the item-rev as string.
bstrItemType
Specify the item-type as string.
bstrRevisionRule
pecify the Revision Rule for which results are to be fetched.
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
This parameter will return the number of components in the BOM structure.
ListOfItemRevIds
2D Array of ItemID and RevID of the components.
ListOfFileSpecs
2D Array of file specification and number of occurrences of the components.
Example
Imports System.Runtime.InteropServices

Public Class Form1
    
    Private Sub GetBomStructureUsingKeyProperties_Click(sender As Object, e As EventArgs) Handles GetBomStructureUsingKeyProperties.Click
        Dim objSEApplication As SolidEdgeFramework.Application = Nothing
        Dim objTCE As SolidEdgeFramework.SolidEdgeTCE = Nothing
        Dim majorVersion As Object = Nothing
        Dim completeVersion As Object = Nothing
        Dim UserName As String
        Dim Password As String
        Dim Group As String
        Dim Role As String
        Dim URL As String
        Dim bTeamCenterMode As Boolean

        Dim MFKAttributes(2, 1) As Object
        MFKAttributes(0, 0) = "item_id"
        MFKAttributes(0, 1) = "001410"
        MFKAttributes(1, 0) = "object_type"
        MFKAttributes(1, 1) = "MFK9Item12"
        MFKAttributes(2, 0) = "mfk9attribute1"
        MFKAttributes(2, 1) = "hhhh"

        Dim FileItemRevID As String = "A"

        Dim ItemTypeMFK As Object
        ItemTypeMFK = "MFK9Item12"

        Dim revRule As String = "Latest Working"

        Dim bDeepList As Boolean = True

        Dim nCount As Long = 0
        Dim ItemRevIds As Object = Nothing
        Dim fileSpecs As Object = Nothing


        Try
            objSEApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objSEApplication.DisplayAlerts = False

            objTCE = objSEApplication.SolidEdgeTCE
            Call objTCE.GetTeamCenterMode(bTeamCenterMode)
            If bTeamCenterMode = False Then
                objTCE.SetTeamCenterMode(True)
            End If

            'Specify Server Credentials
            UserName = "abc"
            Password = "abc"
            Group = ""
            Role = ""
            URL = "http://Servername:8085/tc"

            Call objTCE.ValidateLogin(UserName, Password, Group, Role, URL)
            objTCE.GetBomStructureUsingKeyProperties(MFKAttributes, FileItemRevID, ItemTypeMFK, revRule, bDeepList, nCount, ItemRevIds, fileSpecs)
            MsgBox(nCount.ToString)
        Catch ex As Exception
            MessageBox.Show(ex.ToString)
            Clipboard.SetText(ex.ToString)
        End Try
    End Sub
End Class
See Also

SolidEdgeTCE Object  | SolidEdgeTCE Members