From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Automation reference of class ???

I am working in the Top Level VI of the simple user interface.
 
I'd like to wire the 'Test UUTs' button to a VI.
 
I get the error: refnum conflict : cannot connect different refnum types
The type of the source is Automation reference of class
The type of the sink is Control Refnum
 
So, how do I choose this input type in my VI?
I've looked about everywhere for a refnum to match the 'TestUUTs' button.
 
Anyone know the answer to this?
0 Kudos
Message 1 of 3
(3,311 Views)

Ok, I found that. NOw to the real problem. I passed in a reference to the 'TestUUTs' button from the top level of the operator interface.

I want to programmatically change the button's properties.

If I wire the button to an activeX property node in the top level VI, I can see a list of attributes that I can change, such as Caption, Enabled, Font, etc.

If I wire to the reference to that button inside of my VI, I don't see the list.

Why not?

0 Kudos
Message 2 of 3
(3,308 Views)
In order to pass TestStand Button reference to a SubVI, you should use the Automation Refnum control.  The TestStand Button is an ActiveX control.  In the SubVI you must select what type of reference (ActiveX class) will be passed into the Automation Refnum control.  To do so, right click on the control and choose "Selective ActiveX Class".  If you see TSUI.IButton in the context menu, that's the one you want.  Otherwise, select Browse and navigate to the NI TestStand UI Controls automation server.  Select "Show Creatable Objects Only", then select the Button class from the list of classes.

Now you should be able to wire the reference into an Invoke Node or Property Node.  One thing to watch out for is copying nodes.  LabVIEW keeps the type (although it doesn't appear so), when you copy a node.  So be sure to place a new Property Node or Invoke Node down.  When you wire the reference into the Node, it should say IButton at the top.

Let me know if you have any specific questions.

Regards,

Tyler Tigue
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,290 Views)