11-06-2003 04:32 PM
11-10-2003 08:06 AM
11-12-2003 03:50 PM
08-23-2012 02:59 PM
Just for future reference.
You can do this:
// create the global if it does not exist
tsErrChk(TS_PropertyNewSubProperty (TS_Globals, NULL, "globalname", TS_PropValType_Number, VTRUE, "", 0));
// get a property object reference to the new global that was created
tsErrChk(TS_PropertyGetPropertyObject (TS_Globals, NULL, "globalname, 0, &MyGlobal));
// Set the size of the array
tsErrChk(TS_PropertySetNumElements (MyGlobal, NULL, numElements, 0));
// set a value
tsErrChk(TS_PropertySetValNumber(TS_Globals, &errorInfo, "globalname[0]", 0, 2));
CA_DiscardObjHandle(MyGlobal);
//Release Object
CA_DiscardObjHandle(TS_Globals);
To copy a full array over use the following example:
C:\Users\Public\Documents\National Instruments\TestStand 2010 SP1\Examples\AccessingArraysUsingAPI\UsingCVI