To download NI software, including the products shown below, visit ni.com/downloads.
The following Example Program demonstrates how to share/pass a .NET Object between a TestStand execution and a custom user interface written in .NET.
.NET Objects created in a TestStand execution cannot be directly accessed from a TestStand user interface. This is due to the fact that objects created in the sequence are in a separate Application Domain than the User Interface. .NET objects exist in a particular Application Domain, and an object is only accessible within the Application Domain in which it is created. Because TestStand Creates a new application domain for executing sequence files, the UI cannot directly access the object.
For more information on Application Domains, refer to the article below:
MSDN: Application Domains Overview
To address this limitation, you can access the object reference through the TestStand API to access the object in the TestStand Execution application domain rather than the UI application domain. To use this approach:
When using this approach, consider:
An alternative solution is to use .NET Remoting. For more information, see Sharing .NET Objects Between TestStand and LabVIEW using .NET Remoting.
TestStand 2017 or Compatible
Visual Studio 2013 or Compatible
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.