Solid Edge Framework Type Library
ValidateTcObjectModelUsingKeyProperties Method
Specify the filename in cache.
It is a two-dimensional array which will take Key Properties and their values as input.
Specify the item-type of the item.
Specify the item-rev of the item.
Returns whether the components, datasets, named reference in the local ixf file matches with item created in TC server.
Returns the failure message. These messages are in english. For example: BOM mismatch for test.asm, document contains 5 occurrences, PSE contains 4 occurrences with 3-d Solid Edge datasets in 00145/A using revision rule Latest working
Specify the Revision Rule.
If it is true then it will validate only components.
It will return number of components from server.
Description
It verifies BOM created on server using Key Properties
Syntax
Visual Basic
Public Sub ValidateTcObjectModelUsingKeyProperties( _
   ByVal bstrFilename As String, _
   ByRef pvarMFKAttrInfo As Variant, _
   ByVal bstrItemType As String, _
   ByVal bstrOldRev As String, _
   ByRef bIsTcModelCorrect As Boolean, _
   ByRef bsrtCompResult As String, _
   Optional ByRef vRevisionRule As Variant, _
   Optional ByRef vValidateBOMOnly As Variant, _
   Optional ByRef nNoOfServerComponents As Long = 0 _
) 
Parameters
bstrFilename
Specify the filename in cache.
pvarMFKAttrInfo
It is a two-dimensional array which will take Key Properties and their values as input.
bstrItemType
Specify the item-type of the item.
bstrOldRev
Specify the item-rev of the item.
bIsTcModelCorrect
Returns whether the components, datasets, named reference in the local ixf file matches with item created in TC server.
bsrtCompResult
Returns the failure message. These messages are in english. For example: BOM mismatch for test.asm, document contains 5 occurrences, PSE contains 4 occurrences with 3-d Solid Edge datasets in 00145/A using revision rule Latest working
vRevisionRule
Specify the Revision Rule.
vValidateBOMOnly
If it is true then it will validate only components.
nNoOfServerComponents
It will return number of components from server.
Example
Imports System.Runtime.InteropServices

Public Class Form1 

    Private Sub ValidateTcObjectModelUsingKeyProperties_Click(sender As Object, e As EventArgs) Handles ValidateTcObjectModelUsingKeyProperties.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 ItemTypeMFK As Object
        ItemTypeMFK = "MFK9Item12"

        Dim FileItemRevID As String = "A"

        Dim bIsBomCorrect As Boolean = True
        Dim CompResult As String = ""

        Dim revRule As String = "Latest Working"
        Dim bvalidateBOMOnly As Boolean = False
        Dim nNoOfServerComponents As Integer = 0
        Dim LocalFilePath As String = "C:\Users\xxxx\AppData\Roaming\Unigraphics Solutions\Solid Edge\SEEC\http_xxxx_8085_tc\abc\Default\001410-BE144.asm"

        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.ValidateTcObjectModelUsingKeyProperties(LocalFilePath, MFKAttributes, ItemTypeMFK, FileItemRevID, bIsBomCorrect, CompResult, revRule, bvalidateBOMOnly, nNoOfServerComponents)

        Catch ex As Exception
            MsgBox(ex.ToString)
            Clipboard.SetText(ex.ToString)
        End Try
    End Sub
End Class
See Also

SolidEdgeTCE Object  | SolidEdgeTCE Members