In TestStand, you can define custom step properties, sequence local variables, sequence file global variables, and station global variables. Because the TestStand API is independent of the variables and custom step properties you define, these variables and properties are dynamic with respect to the TestStand API. The TestStand API provides the PropertyObject class so you can access dynamic properties and variables from within code modules, where you use lookup strings to identify specific properties by name.

The following example shows how to call a method of the PropertyObject class on a handle to a SequenceContext object to set a local variable:

int SetLocalVariable(CAObjHandle seqContextCVI)

{

int error = 0;

ErrMsg errMsg = "";

ERRORINFO errorInfo;

VBOOL propertyExists;

// Set local variable NumericValue to a random number

tsErrChk(TS_PropertyExists(seqContextCVI, &errorInfo, "Locals.NumericValue", 0, &propertyExists));

if (propertyExists) tsErrChk(TS_PropertySetValNumber(seqContextCVI, &errorInfo, "Locals.NumericValue", 0, rand()));

Error:

return error;

}