NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

lookup strings for previous step executed and step name of current step

Are there lookup strings for...

1. the step executed prior to the current step
(Example usage: if I have a step in the middle of my sequence that goes to cleanup on error, I want to be able to do something different in the cleanup depending on whether I got to cleanup normally at the end of the sequence or if I got to cleanup because of that error.  In this particular example, it would be even nicer to have a lookup string that directly tells whether the cleanup ran because of an error.)

2. step number and name of the current step being executed
(the ActiveX API has Step.Name, but I can't seem to get that to work in TestStand.. ie, it says RunState.Step.Name is not recognized at runtime)

Thanks in advance for your help,
Melissa
0 Kudos
Message 1 of 2
(2,954 Views)

Hi,

There are properties for looking ate the previous step and next step, these are RunState.PreviousStep and RunState.NextStep.

Unfortunately, you want to check in the cleanup group, that means you will not beable to check the previous step from the Main Group because RunState.PreviousStep does not exist until you have a previous step in the cleanup group.

But you could use RunState.SequenceError, this will contain the error (Code, Msg, Occurred) from the Step that errorred.

Use the NameOf(Step) will return the name of the Step.

 Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 2
(2,940 Views)