NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the if RunState.Caller.NextStep property exists?

Solved!
Go to solution

I am using the SequentialModel Sequence to update the User Interface. However, as suggested here: http://zone.ni.com/reference/en-XX/help/370052M-01/tsfundamentals/infotopics/seq_con_runstate_subpro... ; "This property does not exist during and after the execution of the last step in a sequence step group". How do I check if this property or API Member exists so that I do not get an error message when the sequence reaches the last step?

0 Kudos
Message 1 of 4
(4,273 Views)

PropertyExists("RunState.Caller.NextStep")

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 4
(4,254 Views)

Hi Doug,

 

I tried PropertyExists() but it always returs false. In the SequentialModel, I am using RunState.Caller.NextStep.Name to find the sequence that is being executed. I would get the step names until the last step where it throws an error. Hence, I used PropertyExists() in an if ststement to avoid the runtime error. However, once I used PropertyExists("RunState.Caller.NextStep") I never got any response from RunState.Caller.NextStep.Name, i.e the if statement always returned false.

 

Sumit

0 Kudos
Message 3 of 4
(4,243 Views)
Solution
Accepted by topic author SumitN

 

I found a way thanks to NI Tech Support. The RunState.Caller.NextStepIndex will give a value of -1 if there is no next step.

0 Kudos
Message 4 of 4
(4,196 Views)