How Can I Access Properties of the Process Model from my Client Sequence?
Primary Software Version: 4.2
Primary Software Fixed Version: N/A
Secondary Software: N/A
I would like to access properties such as socket information or the UUT serial number from the process model within my client sequence file. How can I access these properties?
The Runstate.Root object gives access to all properties of the process model being used. From this object, you can access all variables and other properties associated with the model. For example, you can obtain the UUT serial number (Figure 1) and Batch serial number by calling the following expressions, respectively:
The UUT and Batch serial numbers, along with many other process model properties, are dynamic variables which load at runtime. For this reason, they will not appear when editing the sequence. When using these variables while editing your sequence, TestStand may give you an error:
Evaluation Error: Unknown Variable or Property Name.
This error can be ignored, since the property name will become valid once the sequence is executed.
Note: To view dynamic properties, set a breakpoint in your sequence and use the variables pane.
The Runstate.Root property can also be used to access socket information when using the batch or parallel models through the ModelData parameter. The following example shows how to access whether the current socket is enabled:
Keep in mind that the available properties will change depending on the entry point used.
Developer Zone Tutorial: Why Can't I View some Properties at Edit Time?
Developer Zone Tutorial: How do I Access the UUT Serial Number in My Sequence or Test Code?
Report Date: 03/22/2007
Last Updated: 02/19/2010
Document ID: 47LFSHAC