NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get sequence contetxt for the grandparent sequence?

Hi,
 
I tried to use the expression " Runstate.Caller.Runstate.Caller.Runstate.sequence....." to access the subproperty of the grandparent sequence, but it prompts an error.
 
What shall I do if I want to get the context for serval nested sequence calls?
0 Kudos
Message 1 of 2
(2,878 Views)
It's best to put a break point in your code at the place you will call the Runstate.Caller.Runstate.Caller.Runstate.sequence.... from. Execute, then when it pauses go to the context tab and navigate to the the subproperty of the grandparent sequence. Then right click on the sub property and select ""copy path.." and that should get a valid lookup string to use in your code.

Also, these lookup strings are shortcuts that are the equivalent to
Runstate.Caller.Runstate.Caller...

RunState.Root.RunState.Sequence ... references the process model (if you are executing your sequence with a process model)

RunState.Main.RunState.SequenceFile ... references the top level client sequence that is executing, so if you want to get from a sub sequence of a subsequence ... up to the main sequence.

dj
0 Kudos
Message 2 of 2
(2,861 Views)