NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to acess Teststand station global in vb.net

How to acess Teststand station global in vb.net

0 Kudos
Message 1 of 2
(2,933 Views)

Hi ,

 

Thank you poste your question on National Instruments' forums.

You can modify the station globals by getting a reference to the Engine object, geting the Globals property of it and then calling one of the GetVal and SetVal functions.

 

The API is accessed by including NationalInstruments.TestStand.Interop.API and the documentation for the API is located in the TestStand Help.

For instance, if you modify one of the OI examples located in C:\Program Files\National Instruments\TestStand 3.5\OperatorInterfaces\User\Full-Featured\CSharp and put the following code after it : 

this.axApplicationMgr.GetEngine().PersistBreakpoints = true;

Engine eng = this.axApplicationMgr.GetEngine();
eng.Globals.SetValBoolean("bool", 0, true);
MessageBox.Show(eng.Globals.GetValBoolean("bool", 0).ToString());

 

This program modified a global called 'bool' that was created to 'true'.

 

I hope this information will help you.

 

Best regards,

 

Guillaume H.
National Instruments France

0 Kudos
Message 2 of 2
(2,926 Views)