Solid Edge Framework Type Library
ValidateTcObjectModel Method
Specifies the filename in cache.
Specifies itemid of old file. If specified then it will be used to compare the old item revision with new item revision. This is useful when user has to compare item revisions after saveas or revise.
Species rev of old file. If specified then it will be used to compare the old item revision with new item revision. This is useful when user has to compare item revisions after saveas or revise.
Returns whether the components, datasets, named reference in the local ixf file matches with item created in TeamCenter 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.
If revision rule is empty then API will query server information using default revision rule. (It will take revision rule from iman preference IMAN_config_rule_name. If this preference is empty then it will use default as "Latest Working".)
If it is true then it will validate only components.
Returns the number of components from server.
Description
It verifies BOM created on server
Syntax
Visual Basic
Public Sub ValidateTcObjectModel( _
   ByVal bstrFilename As String, _
   ByVal bstrOldItemID 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
Specifies the filename in cache.
bstrOldItemID
Specifies itemid of old file. If specified then it will be used to compare the old item revision with new item revision. This is useful when user has to compare item revisions after saveas or revise.
bstrOldRev
Species rev of old file. If specified then it will be used to compare the old item revision with new item revision. This is useful when user has to compare item revisions after saveas or revise.
bIsTcModelCorrect
Returns whether the components, datasets, named reference in the local ixf file matches with item created in TeamCenter 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
If revision rule is empty then API will query server information using default revision rule. (It will take revision rule from iman preference IMAN_config_rule_name. If this preference is empty then it will use default as "Latest Working".)
vValidateBOMOnly
If it is true then it will validate only components.
nNoOfServerComponents
Returns the number of components from server.
Remarks
This function will compare components, datasets, named reference in the local ixf file with the server and will return failure if any one of them mismatches or not created properly on server. If bstrOldItemID and bstrOldRev is specified then it will be used to compare the old item with new item and comparison is to check the datasets under both item revisions are matching with numbers and types. This is useful when user has to compare item revisions after saveas or revise.
Example
Option Explicit

Sub Example()
    Dim objApplication As SolidEdgeFramework.Application
    Dim objTCE As SolidEdgeFramework.SolidEdgeTCE
    Dim PDMCAcheFilePath As String
    Dim Strolditemid As String
    Dim stroldrev As String
    Dim bIsBomCorrect As Boolean
    Dim CompResult As String
    Dim nNoOfServerComponents As Integer
    Dim vRevisionRule As String
    Dim bvalidateBOMOnly As Boolean

    Set objApplication = GetObject(, "SolidEdge.Application")
    Set objTCE = objApplication.SolidEdgeTCE

    bIsBomCorrect = True
    bvalidateBOMOnly = False

    PDMCAcheFilePath = "C:\test.asm"
    Strolditemid = ""
    stroldrev = ""

    Call objTCE.ValidateTcObjectModel(PDMCAcheFilePath, Strolditemid, stroldrev, bIsBomCorrect, CompResult, vRevisionRule, bvalidateBOMOnly, nNoOfServerComponents)
    
    If Not objApplication Is Nothing Then
        Call objApplication.Quit
    End If
    
    Set objTCE = Nothing
    Set objApplication = Nothing
End Sub
See Also

SolidEdgeTCE Object  | SolidEdgeTCE Members  | Solid Edge ST - What's New