NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using SequenceFilePreStep StepName to Run or Skip Step

Solved!
Go to solution

Doug,

 

Thanks for the suggestion.

 

I'll try:

    theStep.SetRunModeEx("Skip", RunState.Execution)

 

and see if that works any different.  (it obviously should!)

  Won't be able to try it for a while because I have a test running.

  I did figure out a way to remove the Precondition "False" using the next step's SequenceFilePostStep, but it's not as clean as I'd like.

 

Mike

 

0 Kudos
Message 11 of 13
(1,238 Views)

No problem. Note that if you are running the sequence in more than one thread or execution at a time (e.g. with batch or parallel model), there is a race condition with one thread changing the precondition out from underneath the other. These are shared settings. If you are only running one thread though then it doesn't matter.

 

-Doug

0 Kudos
Message 12 of 13
(1,228 Views)

Doug,

 

By the way, I did get a chance to change to code to skip the next step using:

 

  

Runstate.Caller.NextStep.SetRunModeEx("Skip", RunState.Execution)

 

  and it worked great.  Changing the Precondition gave me other problems, such as if I had a precondition, I had to make sure that when I modified it, I had to make sure that it was back at it's previous state (not always easy).

 

The SetRunModeEx("Skip",RunState.Execution) works great, thanks!

 

Mike

0 Kudos
Message 13 of 13
(1,197 Views)