NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Update Station Globals from LAbWindows/CVI user interface

Solved!
Go to solution
Hi,
I am having a requirement such that i need to update a station global variable to true or false based on the click on a button present in User Interface.
My Setup:
Labwindows/CVI 8.5
TestStand 4.2.1
Please advice me.
0 Kudos
Message 1 of 2
(2,785 Views)
Solution
Accepted by topic author ramjeev

Hi,

 

first thing, why have you posted this query twice, http://forums.ni.com/t5/NI-TestStand/Update-Station-Globals-from-CVI-UI/m-p/1317023

 

to be able to update a StationGlobal, you first need to get a reference to the Engine, this can be done using ApplicationMgr.GetEngine()

 

Once you have that reference you can then get a reference to the StationGlobals by the use of Engine.Globals(). this returns a PropertyObject.

 

So now you can use the SetVal methods to set your boolean, eg PropertyObject.SetValBoolean("MyBoolean",  0,  True)

 

hope this helps

 

Regards
Ray Farmer
0 Kudos
Message 2 of 2
(2,771 Views)