10-26-2006 02:38 AM
10-30-2006 01:23 AM
Hi,
If you are able to read the Station Globals, then by using the SetVal method instead of the GetVal method you should beable to set the value.
If the Station Global doesn't exist to start with, then use the value of 1 for the options parameter.
Maybe you could post your example code.
Regards
Ray Farmer
10-31-2006 12:35 AM
Thank for you answer, but I find the instruction.
For create a global variable en TestStand with AxtiveX (C#), We must use "NewSubProperty" inside the class "Globals"
This instruction have some parameters =
1 = string, it's the name you want for the new global variable without "StationGlobals" item .
(Ex : MyVariable, NOT StationGlobals.MyVariable)
2 = PropertyValueType, it's witch type (Number, String, Boolean, ... )
3 = Bool, it's a Array or not.
4 = String, I don't know, but i put nothing ("")
5 = Int, it's the Option (I put 0 also).
With that, you can creat a Global Variable inside TestSTand.
10-31-2006 12:48 AM
Hi,
That's great you found an answer.
But equally you could have used the method
PropertyObject.SetValBoolean ("<variable name>", 1, newValue) and using StationGlobals as the reference.
eg PropertyObject.SetValBoolean("MyBool", 1, True)
Regards
Ray Farmer
05-02-2007 05:26 PM
In my C# project, I have access to the testand active X functionality
NationalInstruments.TestStand.Interop.API.
This contains many things.
Is there some documentation somewhere ?
For example, I am unable to guess which object contains methods to access station globals.
05-24-2007 10:08 AM
05-24-2007 10:28 AM - edited 05-24-2007 10:28 AM
Message Edited by James Grey on 05-24-2007 10:34 AM
05-24-2007 10:38 AM
02-25-2010 05:32 PM
Using C# to access stationglobals ...
String foobar = axApplicationMgr.GetEngine().Globals.GetValString("StationGlobals.OIStuff.foobar", PropertyOptions.PropOption_CaseInsensitive);
but getting the following error:
Unknown variable or property name 'StationGlobals'.
Is this a problem with when I load my model sequence or my model seq is not finding the propery file?
02-26-2010 12:48 AM
Do not use the full lookup string "StationGlobals.OIStuff.foobar"
Use "OIStuff.foobar" only as you are using a reference to StationGlobals. You would use the full lookup if you were using the SequenceContext reference.
Regards
Ray Farmer