Type Casting API Classes - .NET
- Updated2025-07-23
- 1 minute(s) read
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\dotNET\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 to More Generic Class sequence from the Sequences pane. Select the Cast to More Generic Class step, then click Edit in Visual Studio in the Module tab of the Step Settings pane to open the code module. This step casts 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. Select the Cast to More Specific Class step, then click Edit in Visual Studio in the Module tab of the Step Settings pane to open the code module. This step casts 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.