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:

  1. 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.
  2. 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.
  3. 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:

  1. Select Execute»Run MainSequence to execute the sequence.
  2. As the sequence executes, read the message popups for information about the kinds of type casting available in the TestStand API.