Type Casting API Classes - TestStand Expressions
- Updated2025-03-28
- 1 minute(s) read
Type Casting API Classes - TestStand Expressions
Purpose
This example demonstrates how to type cast TestStand objects in order to access specific API properties and methods.
Example File
Location
<TestStand Public>\Examples\TestStand API\Type Casting API Classes\TestStand Expressions\Type Casting API Classes.seq
Highlighted Features
- Built-In Properties
- Dynamic Properties
- RunState Property
- TestStand API
Major API
- PropertyObject.GetPropertyObject
- SequenceFile.AsPropertyObjectFile
- SequenceFile.AsPropertyObject
Prerequisites
None
How to Use This Example
Complete the following steps to review the code in this example:
- Open the Cast an Object Reference sequence from the Sequences pane. Review the statement steps in this sequence. These steps cast a generic object reference to a specific class to access the properties of the specific class.
- Open the Cast to More Generic Class sequence from the Sequences pane. Review the statement steps in this sequence. These steps cast a sequence file object to the more generic propertyObject and PropertyObjectFile classes to access their properties and methods.
- Open the Cast to More Specific Class sequence from the Sequences pane. Review the statement steps in this sequence. These steps cast a PropertyObject to more specific classes to access their properties and methods.
Complete the following steps to run the example:
- Select Execute»Run MainSequence to execute the sequence.
- As the sequence executes, read the message popups for information about the kinds of type casting available in the TestStand API.