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 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.
Revision rule. 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 true then it will validate only components.
Return 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 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
Revision rule. 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 true then it will validate only components.
nNoOfServerComponents
Return 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
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 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
    
    bIsBomCorrect = True
    CompResult = ""
    nNoOfServerComponents = 0
    bvalidateBOMOnly = False
    PDMCAcheFilePath = "C:\Documents and Settings\[user]\Application Data\Unigraphics Solutions\Solid Edge\SEEC\[server]\Default\test.asm"
    Strolditemid = ""
    stroldrev = ""
    
    Call objSolidEdgeInsightXT.ValidateTcObjectModel(PDMCAcheFilePath, _
        Strolditemid, _
        stroldrev, _
        bIsBomCorrect, _
        CompResult, _
        vRevisionRule, _
        bvalidateBOMOnly, _
        nNoOfServerComponents)

    Set objSolidEdgeInsightXT = Nothing
    Set objApplication = Nothing
End Sub
See Also

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