Overview
This code can be used as a tool to programmatically modify a certain property for every step in a sequence file. In this case, we are setting the Result Recording Option to "Enabled (override sequence setting)."
Description
In this example, we first prompt the user to choose the sequence file for which they wouldl like to set all steps' Result Recording Option fields to "Enabled (override sequence setting)."
Then, we iterate through every sequence and step group in the sequence file to ensure that the property is modified for every step.
Last, we let the user decide whether the save the changes made. If the sequence file is loaded into memory while this tool is run, the changes made will be visible immediately. If the sequence file is closed, you must save the changes in order for them to be visible when opening the file.
This example can be added as a tool in the Sequence Editor Tools menu by navigating to Tools>>Customize>>Add... and adding EnableReporting.seq as an item of the type Sequence File.
Steps to Implement or Execute Code
Requirements
Software
TestStand 2012 or newer
Additional Images or Video
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.