12-17-2012 01:15 PM
I'm trying to add a Wait step to a sequence file from C# and can't figure out the syntax. I've got the code to add other steps (
NewStep(AdapterKeyNames.SequenceAdapterKeyName, StepTypes.StepType_SequenceCall)). Is there something similar for the Wait?
Thanks
Solved! Go to Solution.
12-17-2012 01:57 PM
NewStep("", "Wait") should do the trick....
Let me know if that won't work.
12-17-2012 01:58 PM
It may need to be:
NewStep("", "NI_Wait") 🙂
12-17-2012 02:14 PM
That worked to add the step. As a follow up question, how do you then modify the time interval in C#?
12-17-2012 03:17 PM
It will be a string property of the step. Use the step reference to do something like:
Step.AsPropertyObject.SetValString("TimeExpr", 0, "TimeInSeconds") The TimeInSeconds would be a value like 1 or 2.
If you are in the sequence editor you can see the subproperties by adding a step of that type and then clicking on the Property Browser on the Properties tab.
Hope this helps,
12-18-2012 07:22 AM
That helps alot. One more question. Is there any documentation for the step type names for calling them in the API?
12-18-2012 08:23 AM
There is a list of common ones. In the TestStand help on the index tab type: StepTypes
You will see there are some constants for the common step types.
However, if you want to know the real name of a step type then you look in the type pallette. That will have the actual name. Because step types are technically data types you cannot have two steps with the same name loaded into memory at the same time. So if you see it defined in your sequence file and in an ini file they are really the same type in memory.
Hope this helps,