06-07-2005 05:55 AM
06-07-2005 06:44 AM - edited 06-07-2005 06:44 AM
Message Edited by Ray Farmer on 06-07-2005 12:48 PM
06-08-2005 07:34 PM
06-09-2005 12:42 AM
07-10-2005 07:32 AM
Hi Ray,
I"m trying to use this mechanism and it doesn't work!
1) Exist is not recognized by TestStand
2) I'm using the following precondition in a step in the setup section called "testing" --
NameOf(RunState.InitialSelection.SelectedSteps[0]) != "Status"
where "Status" is the name of the step in the main sequence.
I select "Status" test and execute -- 'Run Selected Step using Single Pass'
I get the following error:
The precondition for the step 'testing' could not be evaluated.
Wrong number of array indices.
Error in argument 1, 'RunState.InitialSelection.SelectedSteps[0]', in call to the expression function 'NameOf'.
07-11-2005 08:59 AM
Hi Rafi,
RunState.InitialSelection.SelectedSteps is only populated when you do Run Selected Steps not when using Run Selected using Single Pass. When you use Run Selected Steps with Single Pass use RunState.Root.Runstate.InitialSelection.SelectedSteps.
So to be on the safe side, using NameOf(RunState.Root.RunState.InitialSelection.SelectedSteps[0]) will work in both cases since they are both populated in either scenarios.
I hope this helps
SijinK
National Instruments
07-18-2005 11:26 AM
07-18-2005 01:01 PM
(continue....)
Surprisingly, it does work !!
Now, I'm even more confused.....
can you explain this statement please ? (actually only the first part RunStat.Root.RunStat......)
Thank you
Rafi
07-18-2005 01:06 PM
Hi Rafi,
Runstate.Root.Runstate is a field that is populated only at runtime. So at development time, the expression might seem to have an error. You can find this property, if you place a breakpoint in your sequence and run it. Then click on the context tab and you can see a lot more fields/properties than you had during development.
Glad to know it works
SijinK
National Instruments