ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

valid object reference

Solved!
Go to solution

I have a station global object reference. Is there a way to check if the object reference is valid?

Thanks.

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 4
(4,803 Views)
Solution
Accepted by lvrat

StationGlobals.MyRef != Nothing

 

-Doug

Message 2 of 4
(4,799 Views)

I have a similar issue where I need to know if a session number is still valid before I try to close it.  I have cleanup steps that close references/sessions/handles, etc. in case an error occurs in the sequence, but if no errors occurred, then they should already all be closed.  Would the "!= Nothing" be valid for everything?  Thanks.

 

GSinMN

0 Kudos
Message 3 of 4
(4,477 Views)

Hi GSinMN,

 

The Nothing constant refers to empty ActiveX references.  You can find more information about it here:

 

Special Constant Values: http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/special_constant_values...

 

-Myriam

0 Kudos
Message 4 of 4
(4,462 Views)