NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use CVI function TS_PropertyExists in Full-Featured Operator Interface

I'm trying to use the CVI function
HRESULT CVIFUNC TS_PropertyExists (CAObjHandle objectHandle, ERRORINFO *errorInfo, const char *lookupString, long options, VBOOL *val)
in full-featured operator interface source code shipped with TestStand 3.1. I have problem with the objectHandle parameter which I don't know how to use. Is there already a variable declared and initiliased in operator interface source code which corresponds the objectHandle parameter ? If not, how can I get an objectHandle ?
/Petri
 
0 Kudos
Message 1 of 6
(3,788 Views)

Petri,

The object handle parameter is the ActiveX object handle obtained from Automation Method or property.

This object would depend on which property you want to check for existence.

 

Check the Using LabWindows/CVI with TestStand reference manual for more information.

Best Regards.

0 Kudos
Message 2 of 6
(3,756 Views)

 

I would like to check an existence of the FileGlobals variable in TestStand from OI.

Regards,

Petri 

0 Kudos
Message 3 of 6
(3,748 Views)

Petri -

When do you want to access the variable? Do you want to access the variable on the edit time copy of the sequence in the file that you have loaded into the OI, or do you want to access the variable on a run-time copy of the sequence that is currently executing and being displayed in the execution view of the OI when tracing is enabled?

Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 6
(3,732 Views)

I want to access a variable before starting any execution of the sequence. I guess it's the same as the variable is accessed on the edit time copy of the sequence in the file that I have loaded into the OI. In that way I want to initiliase some variables before starting to execute sequence.

Regards,

Petri

 

0 Kudos
Message 5 of 6
(3,714 Views)

Petri -
The file globals for a sequence file are stored as a subproperty of the file.  You can access the edit-time copy of the file globals by calling SequenceFile.FileGlobalsDefaultValues, which returns a the globals as a PropertyObject. Then you can use PropertyObject.Exists("MyFileGlobalVarName", 0) to determine if the property exists under globals.

Scott Richardson
https://testeract.com
0 Kudos
Message 6 of 6
(3,704 Views)