Hy at all,
i tried to start a my CheckMate application with a journal.
I recorded the Journal while setting up test.
Then i play the Journal but the HD3D Tools "CheckMate" didn´t open.
Is there a way to open HD3D tool "CheckMate" first?
Here is the code i use to run checkmate test. This works pretty good if i manualy open HD3D Tools first.
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main(ByVal args() As String)
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
' ----------------------------------------------
' Menü: Analyse->Check-Mate->Set Up Tests...
' ----------------------------------------------
' Declaration of needed variables
Dim validators1() As Validate.Validator
Dim validatorOptions1 As Validate.ValidatorOptions
Dim status1 As Validation.Result
Dim parsers1() As Validate.Parser
' Initialization of needed variables
theSession.ValidationManager.FindValidator("Check-Mate", validators1)
validatorOptions1 = validators1(0).ValidatorOptions
theSession.ValidationManager.FindParser("Validation Gadget", parsers1)
' do not skip read only parts
validatorOptions1.SkipChecking = False
' Do not load Parts while skipping
validatorOptions1.SkipCheckingDontLoadPart = False
' Do not save to Teamcenter - Needed?
validatorOptions1.SaveResultInTeamcenter = Validate.ValidatorOptions.SaveModeTypes.DoNotSave
' Do not save in Part file - Needed?
validatorOptions1.SavePartFile = Validate.ValidatorOptions.SaveModeTypes.DoNotSave
' Do not save in Part - Needed?
validatorOptions1.SaveResultInPart = False
' Remove all parts to test
validators1(0).ClearPartNodes()
' Only check non-read only parts
validatorOptions1.ExcludeReadonlyParts = True
' Do not explude non-user parts
validatorOptions1.ExcludeNonOwnerParts = False
' Adding items to part list using new conditions.
'Dim allParts As Part()
'allParts = theSession.Parts.ToArray
'For Each checkPart As Part In allParts
'If checkPart.IsFullyLoaded Then
validators1(0).AppendPartNode(workpart)
' End If
'Next
' Loop has been created instead of multiple lines of this:
'validators1(0).AppendPartNode("%UGMGR=V3.2 PH=zCXdnF8m1QPwlA PRH=W4XdnF8m1QPwlA PN=D0433_2238295 PRN=00 RT=""has shape"" AT=""UG master part file"" ")
' The currently available checker profile has to be removed.
validators1(0).ClearCheckerNodes()
' Adding new checker profile to list of checks to execute.
'validators1(0).AppendCheckerNode("%auto_profil")
validators1(0).AppendCheckerNode("%Check123456")
' The DefClass-Name has to be used
' Commit the checks and start the result of the test run
status1 = validators1(0).Commit()
' The Check-Mate result list is being prepared
' Removing all entries off of the list
parsers1(0).ClearResultObjects()
' Changing Datasource to just executed check
parsers1(0).DataSource = Validate.Parser.DataSourceTypes.MostRecentRun
' How many test results - Needed?
parsers1(0).MaxDisplayObjects = 99
' Activate new options
parsers1(0).Commit()
' ----------------------------------------------
' Menü: Werkzeuge->Journal->Stopp
' ----------------------------------------------
End Sub
End Module
Thanks Hagen
re: open HD3D tool palette
Are you talking about opening the HD3D tool palette?
If so, I don't think the API gives us access to open/close items on the resource palette (or other native dialogs for that matter).
Yes i tried to open it as you
Yes i tried to open it as you can do for visualreporting.
I also thing that there is no possibility for checkmate within the API.
Now I solved this problem with a little macro.
Thanks Hagen
NX 9 and Team Center 10