From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass thisContext reference to executable???

Solved!
Go to solution

I will go for "Engine" instead of Context.

Building the container will not work in my case since i can read dynamically open sequence where i have to collect all subsequences/steps/input names/property names/values/etc so i need to have a reference to Engine to read it when I want. 

0 Kudos
Message 11 of 15
(1,081 Views)
I think you might have misunderstood what I meant about using a container. I meant creating a container propertobject with a reference to the engine as a subproperty as well as the file path you need as a different subproperty. Basically as a way to pass more than one thing as a single notification or enqueue. That way you could add additional subproperties in the future without having to change the code for the sync object access. You would just access the new subproperty of the container with a different lookup string containing its name. For example

Mycontainer.GetValInterface("engine", 0) would get the engine reference and mycontainer.GetValString("initialfilepath", 0) would get the file path from the container.

It's not all that important though, just an idea that might make it easier to pass more data in the future.
0 Kudos
Message 12 of 15
(1,080 Views)

I am facing the similar issue... I want to read the runtime Fileglobal values of the TestStand in LabVIEW.

FOr that i need the active sequence context which is pointing to the current sequence which is executing in teststand.

The VI which is shared above to get the sequence context , Can I use same to get the active sequence context so that I can access the Runtime values of the Variables?

 

 

 

0 Kudos
Message 13 of 15
(989 Views)

Are you writing a UI? If so, you should probably get the file globals while the execution is paused waiting for a UIMessage to be handled such as at the UIMsg_StartExecution or UIMsg_StartFileExecution UIMessage. The UIMessage should have an execution subproperty which you can then use to call Execution.GetFileGlobals(). In the case of UIMsg_StartFileExecution you can get the file globals for that sequence file by getting the sequence file reference from the ActiveXData property of the UIMessage.

 

Hope this helps,

-Doug

Message 14 of 15
(978 Views)

I got the solution.

I am using UI messages now and I am getting this context reference from the thread subproperty now.

0 Kudos
Message 15 of 15
(961 Views)