NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Where in Runstat variables is the loop index?

I run my sequence in 'Loop on Selected steps using Single Pass".  Where do I find the loop index?

 

Thanks

Rafi

0 Kudos
Message 1 of 2
(2,659 Views)

Rafi -

We have an open issue 45415 to add API to make this information available in a future release, but the only workarounds that I am aware of are the following:

1) Using step.GetStepSettingsString(), one can retrieve the step setting string displayed in the execution view. After some string manipulations, the user can extract the loop index out off it.

2) If you are executing on the steps in the active context that starts the interactive execution, the following expression also works in simple cases where branching steps are not used:
Round(RunState.NumStepsExecuted/ThisContext.InteractiveContext.InteractiveArgs.NumSteps)

Scott Richardson
https://testeract.com
Message 2 of 2
(2,649 Views)