Showing results for 
Search instead for 
Did you mean: 

VIs that allow you to test if a given control is a control of a particular LabVIEW class type

The attached zip file contains VIs are saved in LabVIEW 8.5.
Included in the .zip are three VIs you may find useful when working with LabVIEW classes.
  • Qualified Name Array To Single takes a VI's qualified name, given as an array of strings, and converts it to a single colon-delimited string. This VI may be useful for working with VIs owned by any library type, and it is used as a subVI of the other two VIs in this .zip file.
  • Is This Control Of This LabVIEW takes a control refnum and a LabVIEW class refnum and tells whether the control is an instance of the given LabVIEW class. It returns true for regular class controls/indicators and for XControls of the class.
  • Is This Control Of LabVIEW Object is the same as the previous, except it does not take a class refnum for input. LabVIEW Object is the built-in class that is the ancestor of all other LabVIEW classes, and this VI specifically checks to see if the given control is an instance of this class.

The second two VIs in this .zip file are both password protected. In a built application, both will return a "not supported" error.


Message 1 of 6
Thanks for posting these VIs to the forum, so that others may benefit from your work.
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
Message 2 of 6
Revised version of the VIs, now with more unlocked block diagrams.
Message 3 of 6
I'm seeing an 1063 error when I try to use the "Get Control Data" on a control extracted from a cluster or an array. The error does not show up if I use a control reference or extract the control from the front panel. Is this a bug or am I doing something wrong?

Champion CLA Instructor

Making senseless computers do
intelligent real world things
is NOT easy. SO MAKE IT FUN!
0 Kudos
Message 4 of 6
These VIs only work for top level controls (aka those controls that have an FPTerminal). That probably means I should do something special to handle subpanel controls (since they're the special case of no FPTerm). But the type information in all other cases is only available at the top-level, so I'm not going to be able to refine this further (though I may be able to provide a better error message). Traverse the type descriptors instead of the control references when you want to know the type of subcontrols.
0 Kudos
Message 5 of 6

I did the work around as you stated.

Thanks again for posting these vis. I am using these my latest version of the Subvi fixer.

They help me classify the controls on the Front Panel so I can pair them up and wire them to the connector pane.

Champion CLA Instructor

Making senseless computers do
intelligent real world things
is NOT easy. SO MAKE IT FUN!
0 Kudos
Message 6 of 6