05-21-2023 04:48 AM - edited 05-21-2023 04:58 AM
-------->
hello! do you know if there is an efficient way to know the control type referenced by a refnum, regarding clusters/arrays/multicolumn lists?
the option "show control" often just returns an empty control, wherehas a typed control is truly pointed.
you can reproduce the example by selecting your control and right click "create->reference" then right click at the reference and "create->control". In my project I have lots of these kinds of refnums, apparently void, and I don't have access to the initial control made for their creation.
any help is welcome 🙂
Solved! Go to Solution.
05-21-2023 10:09 PM
Depending on the particulars, this might be helpful:
05-22-2023 03:08 AM
05-22-2023 09:18 AM
thanks 🙂
05-25-2023 08:54 AM - edited 05-25-2023 08:55 AM
Hello, I'm still blocked regarding multicolumn listboxes (see code joined - lv2020). the previous suggestions don't work
"
Depending on the particulars, this might be helpful:
This way just returns an enum
"If you have a strictly-typed Control refnum, you can know its contained type by using the "Get Refnum Information.vi" from the Data Type Parsing Palette:"
IWith this way I don't get relevant information to understand what is different about this reference
can you help?
05-25-2023 09:34 AM - edited 05-25-2023 09:44 AM
The type included in a strictly-typed MultiColumn ListBox refnum (i.e. the type of the "Value" property) is either an I32 or an array of I32 representing the index(es) of the currently selected item(s). Whether it is a scalar or an array depends on the right-click menu configuration of the MultiColumn ListBox: "Selection Mode" -> "Data Type" -> "Scalar" or "Array".
Scalar Mode:
Array Mode:
To be able to wire together strictly-typed refnums, the included type must be the same.
In your example, your control refnum is a strictly-typed Scalar MultiColumn ListBox refnum, while the type contained in the cluster is a strictly-typed Array Multicolumn ListBox refnum.
2 options:
1. Make the refnum in the cluster NOT include the type (Right-click on the refnum, uncheck "Include Data Type").This will add a coercion dot and your refnum will be converted to a generic (non-strict) refnum:
2. Change the Selection Mode of your Multicolumn ListBox to "Array" to make it compatible with the strict type in the cluster: