Accessing Arrays Using API - .NET
- Aktualisiert2025-07-23
- 1 Minute(n) Lesezeit
Purpose
This example demonstrates how to use the TestStand API from a .NET assembly code module to access a one-dimensional array, two-dimensional array, and an array of strings in TestStand.
Example File Location
<TestStand Public>\Examples\TestStand API\Accessing Arrays Using API\DotNet\Accessing Arrays Using API.seq
Highlighted Features
- .NET Adapter
- TestStand API
Major API
- PropertyObject.NewSubProperty
- PropertyObject.GetValVariant
- PropertyObject.SetValVariant
Prerequisites
None
How to Use This Example
Complete the following steps to review how TestStand calls the functions in the DLL, review the created local variables, and review the parameters passed to and from the functions.
- Open the AccessingArraysDotNet.seq example sequence file. On the Variables pane, the NumericArray and StringArray local variables have been created, but do not contain any data.
- On the Steps pane, select an Action step.
- On the Step Settings pane, review the settings for the Action step. The step does not pass local variables to or return local variables from the function.
- Select Execute»Single Pass to run the sequence. The DLL calls populate the local variables with data, and the .NET assemblies access and display the data.