09-06-2016 07:07 AM
Dear all,
I'd like to use this method to get some information of the current execution as metioned in Help of this method.
I don't understand how to set input parameter of formatExpression.
For example, I need TestSocketIndex of the present execution, and got nothing while:
formatExpression = ""
or formatExpression = "%1"
or formatExpression = "%TestSocketIndex%"
Thank you for any advice!
09-06-2016 05:02 PM
Hello labc good afternoon,
Thank you for contacting the forum support from NI, based on your question I would suggest that you refer to the TestStand help in the tab index and search for the CaptionSources Enumeration where it refers to the CaptionSource_MacroExpression, I think this can give a good example on how to use the instruction.
If you want to check the TestSocketIndex I would suggest to use the following value "RunState.TestSockets.MyIndex".
I hope that this information is useful,
Best Regards,
CaEnOs
09-06-2016 10:07 PM
Hi, CaEnOs,
I can get TestSocketIndex with the Expression you post in TestStand Edit envirment.
Now what I want to do is to get this information in a customized UI we are developing. Likely there are 2 ways:
1, use expression or variable in TestStand edit envirment, and then get expression value with a TS methor or property.
I don't know how to get express value in this way.
2, use method of GetCaptionText what I am confued.
I can get Username with this method, but get nothing of TestSockectIndex in callback of EndExecution while I'm running 2 executions in parallel.
I failed to do anyone above and could you give me a example?
09-13-2016 10:47 PM
Some updates, I can get TestSocketIndex by using UI massage callback.
Using properties of Event and NumbericData of object uimessage,NumbericData is TestSocketIndex if NumbericData=UIMsg_ModelState_Initializing