NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programatically change the steps that have been selected for single pass?

After the user selects a step(s), and then selects "Run selected steps using --> single pass" from the pull-down menu, I need to change the steps that will actually be run. Is there a way to do this?

I tried writing to "RunState.InitialSelection.SelectedSteps" but this appears to permanantly overwrite the steps in the sequence file as opposed to changing which steps are run.
0 Kudos
Message 1 of 3
(3,107 Views)
Hello,

If you always want to run certain steps previous to the steps you selected when you "Run Selected Steps," you can place those steps in the setup step group. However, if you want to want those steps to be dependent on which steps you selected, you can use preconditions and the "RunState.InitialSelection.SelectedSteps." I am attaching an example written in TestStand v3.1 to this post which will demonstrate how to do this. I believe that you will be able to modify this example to suit your application. I hope this information helps you out.

Regards,
Kevin L.
National Instruments
0 Kudos
Message 2 of 3
(3,058 Views)
KHartman -
The Sequence Editor or OI calls the method Engine.NewExecution for a root interactive execution that uses a process model entry point. Internally the method builds a list of steps to run and this list is not exposed in any way. Yes you do see a similar list by looking at RunState.InitialSelection.SelectedSteps, but this list is not what is used internally, so any changes to it would not affect the steps executed by the interactive execution.
Scott Richardson
https://testeract.com
0 Kudos
Message 3 of 3
(3,027 Views)