NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to dynamically change a step name during execution (but not save result)

I'm trying to change the name of a step dynamically in the sequence file that I'm running. Anyone know the best way to do that?
 
I used 4 consecutive active x steps (NI Teststand 3.5 API) to get a sequence file reference, then a sequence reference, then a step reference, and then set the name of the step. The only problem with this is that it saves the changes to my sequence file. I just want to change the name of the step at runtime.
 
0 Kudos
Message 1 of 3
(4,061 Views)
Seems you have to use a temp var to store the original step name, then, set that name back in Cleanup step group.
0 Kudos
Message 2 of 3
(4,048 Views)

Hi,

All you need is one ActiveX Automation Step and use "Set PropertyObject.Name".

If this step is place just before the step whose name you wish to change then use as the reference RunState.NextStep.

If you wish to restore back to the previous name then, you will need to obtain the steps' name before you change it and this can be done in the pre-expressions of the ActiveX Step, use the Locals.tmpStepName = NameOf(RunState.NextStep)

If you want to restore the name afterwards. Insert an ActiveX Step after your step whose name you have changed.

Use the ActiveX step as before, but this time use the reference RunState.PreviousStep and use the Locals.tmpStepName as the parameter. (Obviously with this step you dont need the pre-expression)

So thats one step to change the name and one step to restore the name.

Hope this helps

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 3
(4,042 Views)