The RunState.SequenceFile.Data.FileGlobalDefaults.myVariable property contains the default value of the sequence file global variable myVariable, rather than the run-time value. To access the run-time version of your sequence file global variables, you must call the TestStand API using two ActiveX Action Steps:
- Call the GetFileGlobals method of the Execution object class with the client sequence file as a parameter. The output will be a property object containing a reference to the run-time client sequence file global variables. Configure the step as outlined in the chart and image below:
Automation Server: | | NI TestStand API (your current version #) |
Object Reference: | | RunState.Execution |
Object Class: | | Execution |
Action: | | Call Method |
Method: | | GetFileGlobals |
Return Value: | | FileGlobals |
sequencefileParam: | | RunState.SequenceFile |
- Use the new property object reference to set the value of the client sequence file global variable, myVariable. Call the SetVal<datatype> method, where <datatype> is the data type of the variable, and use the lookupString parameter to specify which client sequence file global variable to update. Configure the step as outlined in the chart and image below, where updatedValue is the new value of of myVariable.
Automation Server: | | TestStand API (your current version #) |
Object Reference: | | FileGlobals |
Object Class: | | PropertyObject |
Action: | | Call Method |
Method: | | SetVal<datatype> |
lookupString: | | "myVariable" |
options: | | 0 |
newValue: | | updatedValue |