TestStand Variables Don't Update Using a Property Loader Step with a Custom File

Updated May 9, 2023

Reported In

Software

  • TestStand

Other

Software: TestStand

Issue Details

I am using a custom .txt file to store my TestStand variables and when I try to import them using a Property Loader step, the variables are not being updated. Is there a way to solve this?

Solution

If you are using a custom made .txt file to store your TestStand variables, you must always include the following tags:

  • <Step Name>
  • <Locals>
  • <FileGlobals>
  • <StationGlobals>

These tags must be included even if you aren't exporting/importing any given property or limit.

Additional Information

Due to the nature of how the Property Loader step interprets a text file or spreadsheet, a certain tag style must be maintained for it to properly identify and load a given value. Assuming that we have at least one step and one of each of the various variables being exported, the default appearance of a file generated by the Import/Export Properties Tool in TestStand would look something like the following:
<Step Name>           Result.PassFail
Pass/Fail Test        TRUE
         
<Locals>              Variable Value 
MyLocalVariable       4.0
 
<FileGlobals>         Variable Value
MyGlobalVariable      3.2
 
<StationGlobals>      Variable Value
MyStationVariable     2.0
If you are creating your own file from scratch, you must include the <Step Name>, <Locals>, <FileGlobals> and <StationGlobals> tags, in the same order that they appear in the example above. These tags must be included even if you aren't exporting a given property or limit because TestStand looks for each tag in order, so if you skip over the tag <Step Name> ,then it will check the whole file for <Step Name>. If it does not find it, TestStand assumes the file is empty even if it isn't. Since this is correct behavior for the Property Loader, TestStand does not generate an error. It is very important to include the tags in the correct order to avoid confusion.

Below is an example of what an empty properties file might look like. This template can be used to create new properties files from scratch simply by inserting step/variable names and values where appropriate.
<Step Name>           
        
<Locals>              Variable Value 
 
<FileGlobals>         Variable Value
 
<StationGlobals>      Variable Value
Since this is tab delimited, make sure that there is a tab after each of the tags in the text file.

For more help about the Property Loader step and Import/Export Properties Tool, refer to Step Types in the NI TestStand Help.

Note: If you need to add multiple elements to a certain variable make sure that you consider using the end of line characters since using the return key on your text file will break the structure of the file and hence your values won't be updated as expected either