Replace TestStand Configuration Files Programmatically

Updated May 4, 2023

Environment

Software

  • TestStand

Operating System

  • Windows

I am working with multiple TestStand workspace files each having their own configuration files (StationGlobal.ini and MyTypes.ini) located in the respective project directories. When I open the workspace (.tsw) file, both these configuration files should automatically replace the default configuration files present in the TestStand Public folder.
If I override the SequenceFileLoad callback to implement this, the TestStand Sequence Editor throws a pop up to reload the configuration files.
  • Can I handle this pop up programmatically?
  • Is there any other way I can replace the configuration files when opening the workspace file?

Every time you modify the configuration files outside the TestStand environment, for example, for editing the file or for replacing it with a newer version, while an instance of TestStand Sequence Editor is open, you will not see the changes in the Sequence Editor unless these files are reloaded in the TestStand environment.

To see the desired effect, you need to close the instance of TestStand currently open and then launch it again. If you continue to work with the older instance of TestStand, the Sequence Editor will detect a change in the configuration files and will generate a pop up for Reloading the Configuration files. Since this is generated by the sequence editor, suppressing or handling this pop up would not be possible programmatically.

Alternately, follow the below mentioned approach:
  1. Write a script or a LabVIEW VI to copy the configuration files from the project directory to the TestStand Public folder.
  2. Run the script/VI. This step can be implemented via command line prompts to automate the process.
  3. Invoke an instance of TestStand. Once launched, TestStand will call the .ini file that you have recently copied from your project folder and will reflect the desired changes.

Additional Information

TestStand 2016 and later offer a setting called 'Environment' using which, you can load all the settings and files corresponding to the specific environment that you set. This will enable two TestStand system configurations to exist on a single system side-by-side. Further details about the same can be foundĀ here.