LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Properties of Facade Items in XControl from a VI that Uses the XControl

Solved!
Go to solution

In an array of references, the type of reference is the lowest in the class hierarchy that encompasses all of the types used to build the array.  So if your array contains any references to controls that are not that specific Xcontrol, the class will be "control" and only generic properties will be available.  The same will be true for the "Controls[]" property of a front panel.

However, once you've extracted a particular reference from the array, if you know that it is a reference to an instance of your Xcontrol, then you can use the "To More Specific Class" function to change it to the class that references your Xcontrol.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 11 of 13
(921 Views)

Yup just tested it, this works, it gets a reference to a fabulous XControl posted over on LAVA.  Using the This VI I get a reference to a control with the label of "Variant Tree" then I use more specific class to the variant reference (I just made a constant from the create reference) then I had access to those XControl properties.

 

Example_VI_BD.png

0 Kudos
Message 12 of 13
(915 Views)

Yes, that was the problem, thank you! Casting the property reference to the same class as the XControl worked to make the XControl specific properties available in the property node.

0 Kudos
Message 13 of 13
(906 Views)