10-25-2022 04:06 PM
Is there a property to figure out if a numeric controls data type is e.g U32 or I64? I hand the control to a SubVI by reference.
Solved! Go to Solution.
10-25-2022 04:11 PM
There is a property called "Representation" when you enable scripting.
10-26-2022 02:01 AM - edited 10-26-2022 02:35 AM
Thanks for suggesting Representation. I can't find this on my properties.
Is there no way without Scripting?
edit: I enabled scripting and now Representation shows up. Thx
10-26-2022 02:36 AM
Beware that scripting properties are not available in executables.
10-26-2022 02:40 AM - edited 10-26-2022 02:49 AM
I have a .ctl containing different Rings and Numerics. I hand this .ctl via it's reference to my SubVI, because the Rings StringsAndValues[] are edited.
If I pass the .ctl via Value those StringsAndValues[] are lost. That is the reason I have to pass by Ref.
So can I cast my reference to my specific control then? If yes, how do I generate a class from my specific .ctl ?
10-26-2022 02:50 AM - edited 10-26-2022 02:54 AM
You can pass your reference as generic Control (as you probably are already doing), use "To More Specific Class" and check whether an error is thrown. But you must try with all possible types.
Edit: if the subvi expects only one type, you must pass a typed reference. To change the reference type, drag a control of desired type into the reference terminal control of the subvi.
10-26-2022 04:42 AM
As simpler way is to use the Get Type Information.vi.
Control reference is a generic Control GObject. Make this into a subVI and wire your control reference to it. You'll get a coercion dot, since it converts to the generic GObject class. However, you'll still get the correct data type.
10-26-2022 09:19 AM
@pincpanter wrote:
Beware that scripting properties are not available in executables.
I believe this one is available in the runtime engine.
10-27-2022 03:30 AM
@Gregory ha scritto:
@pincpanter wrote:
Beware that scripting properties are not available in executables.
I believe this one is available in the runtime engine.
You are right. Thanks, I learned something new.
10-29-2022 09:27 AM
If I understand correctly, not all festures of scripting are available in builds. How does one know? What about real time targets?