Loop Index for Interactive Execution in TestStandPrimary Software: TestStandPrimary Software Version: 4.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I am running an interactive execution by right-clicking the steps and selecting Loop on Selected Steps... Is there a method to retrieve the loop index of the execution? Solution: Interactive loop index is not directly exposed by any objects in TestStand. One workaround is to use the step.GetStepSettingsString() method. During interactive execution, this method will return a string in the format below, with X being the loop index. Interactive (X) You need to perform additional string manipulation to retrieve X. Note that the loop index will be included in the step setting string only if the loop count is greater than 1. This method requires a reference to a step as an input. You can use the sequence context to get a reference to the sequence, and then the step. In addition, the InteractiveArgs object contains the step indices that are included in the interactive execution. A simple example is attached below to demonstrate this process. To use it, simply select all the steps in the sequence, Related Links: KnowledgeBase 2D4ET2O6: How Can I Use the Run Selected Steps and Loop On Selected Step Options Using Any Execution Entry Point? Attachments:
Report Date: 02/06/2008 Last Updated: 06/05/2009 Document ID: 4I59QJM6 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
