Modifying or Adding Custom Data Types Programmatically in TestStand

Updated Apr 23, 2026

Reported In

Software

  • TestStand
  • LabWindows/CVI

Issue Details

I am using LabWindows™/CVI to add or modify TestStand Custom Data Types through the TestStand API. I want to understand how to programmatically create or update these data types within my own application. I do not use LabVIEW, so I am specifically looking for sequence file examples. 

Solution

TestStand does not support direct modification of a custom data type once it is created. To change the data type, the existing property must be deleted and recreated with the desired type. There are two approaches depending on the execution context:

  • Using the sequence context: This way is recommended if the change needs to be done from within a sequence file. Use the StationGlobals object to delete and recreate the custom data type: 
    1. Add the custom data type in station globals by using:
      StationGlobals.DeleteSubProperty("MyCustomSG", PropOption_DeleteIfExists),
      StationGlobals.NewSubProperty("MyCustomSG", PropValType_NamedType, False, "A", 
    2. Since there is no direct way to modify the data type, we can delete and change the data type of the custom type:
      StationGlobals.DeleteSubProperty("MyCustomSG", PropOption_DeleteIfExists),
      StationGlobals.NewSubProperty("MyCustomSG", PropValType_NamedType, False, "B", 0)

     

    • Using the TestStand Engine: This one should be used when the custom type needs to be added when running TestStand from another application like LabVIEW or CVI that does not require a sequence file. Use the RunState.Engine.Globals object to manage Station Globals:
      1. To add a custom data type into station globals use: 
        RunState.Engine.Globals.DeleteSubProperty("MyCustomSG", PropOption_DeleteIfExists),
        RunState.Engine.Globals.NewSubProperty("MyCustomSG", PropValType_NamedType, False, "A", 0)
      2. To modify the station global use:
        RunState.Engine.Globals.DeleteSubProperty("MyCustomSG", PropOption_DeleteIfExists),
        RunState.Engine.Globals.NewSubProperty("MyCustomSG", PropValType_NamedType, False, "B", 0)

    The example can be downloaded by clicking the Modifying Data Types of Temp Globals link below.