Obtain TestStand Sequence File Version Programmatically

Updated May 9, 2023

Reported In

Software

  • TestStand

Programming Language

  • LabVIEW G

Issue Details

I would like to obtain the sequence file version of the sequence that I am currently executing. Is there a way to obtain this information at execution time?

Solution

To access this property dynamically, you can use the TestStand API. TestStand provides you with a reference to the sequence file that is being executed through the current SequenceContext. The property that contains this reference is RunState.SequenceFile, which is a reference to an ActiveX SequenceFile object. The RunState.SequenceFile.Data.Version property is a string that corresponds to the version of your sequence file. 

In TestStand 3.0 and later, you can also use the RunState.SequenceFile and make ActiveX calls to obtain the sequence file version:
  • First, you will have to change your sequence file reference to a PropertyObjectFile reference. You can use the AsPropertyObjectFile method of the SequenceFile class to do this.
  • Once you have a PropertyObjectFile reference, you can call the Version property. This property returns the version of your sequence file as a string. 

Using the TestStand API from LabVIEW (2019) you can use the following approach:

Additional Information

To access the sequence file version manually, navigate to Edit»Sequence File Properties. You can view and modify the version number of your sequence file from here. For more information on the Sequence File Properties Dialog Box, see TestStand Help: Sequence File Properties Dialog Box .

In TestStand 2.0.1, the PropertyObjectFile's Version method is not available in the TestStand API. However, RunState.SequenceFile.Data.Version is a hidden property that you can use to retrieve sequence file version. Because it is a hidden property, you will not be able to see it in the Expression Browser or the SequenceContext until you have enabled the Show Hidden Properties option in TestStand. This can be done by selecting Configure»Station Options, clicking the Preferences tab, and enabling the Show Hidden Properties option. This hidden property is available in TestStand 2.0.1, TestStand 3.0, and all later versions. See the attached sequence for an example of using this API function.