LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Current SequenceContext

I need to get the current SequenceContext at any time during execution. The SequenceContext handle is NOT passed to the "C" function.

Is there any "Global" that TestStand has to keep track of the current SequenceContext?

Thanks
0 Kudos
Message 1 of 3
(2,744 Views)
Jollyto,

There is no global variable in TestStand that keeps track of the current Sequence Context. However, even if you aren't passing a direct reference to the sequence context to your code module, if you are passing almost any reference to a TestStand object, then you can use the TestStand API on that object to get a reference to the sequence context. These methods are documented in the TestStand Help and there is also a flow chart that describes how each TestStand object relates to the other TestStand objects. You can find this chart in the TestStand Help under the title "Using TestStand API Objects". Simply type that in the Index. In the chart, any time you see an arrow connecting one object to another, you'll call the TestStand API to get a reference to t
hat next object type using the object that you already have a reference to as the starting point. In the help in TestStand 3.0, you can even click on the objects shown in the chart and it will take you directly to the documentation about that TestStand object.

Hope that helps!
Regards,
Shannon R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,744 Views)
Thanks for the info. That I learned yesterday. And looking at the flowchart I though I can use the following Path:

Engine->UIMessage->Thread->SequenceContext.

I tried this but the UIMessage is not there all the time.

What I did was to use the PreStep Sequence File Callback. The callback will call a DLL function which setup a global with the current SequenceContext reference. This might be an overkill but it worked for now.
0 Kudos
Message 3 of 3
(2,744 Views)