10-12-2011 08:57 AM
Hi there. I would like to be able to access from the process model the index of the current step in MainSequence of the the currently executing sequence file. My goal is to form the process model determin the number of steps in MainSequence from the process model at the beginning of execution (I think I have a handle on this) and then in a PreStep callback in the process model be able to determin that I am on step, for example, 6 of 15 in MainSequence. I have thousands of steps total in all the sub sequences with lots of looping so I do not really want to consider those, just the steps in MainSequence.
I am just not sure what the API call chain is to pick that up.
Thanks!
Greg
10-17-2011 07:00 PM
Hi Gosenbach,
In this case, RunState.NumStepsExecuted may do what you want. Though it is not necessary giving you an index of the step in which it is executing, you can derive that if the value is 3, then 3 steps have been executed and Teststand is currently executing the fourth step. This will also start over for every category. It will count the number of steps in Setup, then start over for Main. Unfortunately, there does not seem to be a MainSequence.StepIndex or MainSequence.NumStepsExecuted call. I hope that this helps!
Regards,
Jackie
10-18-2011 12:55 AM
Hi Greg
If this would be my task, i would first determine the all of the steps that WILL be used in MainSequence
by calling: RunState.SequenceFile.GetSequenceByName("MainSequence").GetNumSteps(StepGroup_Main)
and store it in a FileGlobal of your Model.
Note: This is only vaild for Steps inside the Main! Steps insde Setup and Clean up where not focused!!
During runtime consume SequenceFilePreStep Callback.
Determine the current index by using: Parameters.Step.StepIndex
And to filter only for MainSequnence use for PreCondition: StrComp(Parameters.Step.Sequence.Name,"MainSequence")== 0
and Parameters.Step.StepGroup == StepGroup_Main
Now you can do: I am 6 of 15 in MainSequence.
Hope this helps
Juergen
10-18-2011 10:34 AM
Thank you Jeergen and Jackie. I'll give that a shot and report back how it went. Thanks!
Greg