Property Loader Step Type - Loading Limits from Two Different Text Files
- 更新时间2025-07-23
- 阅读时长2分钟
Purpose
This example demonstrates how to use the Property Loader step to dynamically load step limits from different text files depending on user input.
In the Setup step group of the MainSequence, the Message Popup step launches a dialog box to prompt the user to choose which file TestStand uses to load limits values. The Select Limit File Statement step in the Setup step group selects the limit file. The expression for this step uses a conditional operation in which TestStand loads limits from RevisionALimits.txt when the value of the Result.ButtonHit property equals 1. The expression specifies that TestStand loads limits from RevisionBLimits.txt for all other cases.
When you write a sequence in which the user must choose between three or more limit files, use a Property Loader step for each limit file and use a precondition for each step that checks for user input. For example, when the Message Popup step specifies four buttons, each Property Loader step can check which button was clicked in the precondition.
Example File Location
<TestStand Public>\Examples\Built-In Step Types\Property Loader Step Type\Property Loader - Loading Limits From Different Files.seq
Highlighted Features
- Property Loader steps
- ReportOptions callback
Major API
None
Prerequisites
None
How to Use This Example
Complete the following steps to review the sequence functionality.
- On the Steps pane, select the Property Loader step in the Setup step group.
- On the Step Settings tab of the Step Settings pane, confirm that the source location in the sources table specifies the Locals.LimitFileToLoad variable. The value of this variable at run time determines which file TestStand loads.
- Navigate to the <TestStand Public>\Examples\Built-In Step Types\Property Loader Step Type directory and review the RevisionALimits.txt and RevisionBLimits.txt files. Each file specifies a different set of limit values for the sequence.
- On the Steps pane, select the Select Limit File step, which is an instance of a Statement step type. This step sets the Locals.LimitFileToLoad variable to the correct value depending on which file the user selects.
Complete the following steps to run this example.
- Select Execute»Single Pass to run the sequence.
- When prompted, select the Revision A Limits option.
- When execution completes, review the report on the Report pane. The report indicates that all steps passed.
- Select Execute»Single Pass to run the sequence again.
- When prompted, select the Revision B Limits option.
- When execution completes, review the report on the Report pane. The report indicates that not all steps passed because of the different set of limit values. The step results have not changed.