NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Post Expression of Step (Not Next or Previous Step)

Solved!
Go to solution

Is it possible to set the post expression of a step, which is not the Next or Previous step?  

 

I know this is possible

 

RunState.NextStep.PostExpression = "Enter Post Expression Here"

 I am looking for something like

RunState.Step("StepID").PostExpression = "Enter Post Expression Here"

 

Does anyone know if there's a way to accomplish something to that effect?

 

Thanks!

0 Kudos
Message 1 of 5
(4,655 Views)
Solution
Accepted by christopherdean

RunState.Sequence.GetStepByUniqueId("ID").PostExpression = "Blah"

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 5
(4,645 Views)

Thank You! 

 

I didn't realize I should be looking in RunState.Sequence

 

I think I'm going to use GetStepByName now that I know that exists, and I can paramterize that to be an intuitive control.  

0 Kudos
Message 3 of 5
(4,641 Views)

If you plan on executing the sequence in multiple threads at once, it's best not to make a self-modifying sequence like this since many of the step setting properties like PostExpression are shared between all threads.

 

-Doug

0 Kudos
Message 4 of 5
(4,604 Views)

Doug,

 

Thanks for the heads up.

 

The step will only change once, at the start of the routine, if at all.  I am only interested in setting up the elements of an array which I write to my datalog, which does not change very often, and will not change once the routine is running.

0 Kudos
Message 5 of 5
(4,566 Views)