02-05-2008 09:50 AM
02-05-2008 10:11 AM
I never tried that before but I suggest you start with the "to more specific" node and after attempting to cast is as the stict type, check the error cluster to see if it worked.
Just my first thought, so forgive me if that does not work!
Ben
02-06-2008 06:32 PM
Hi,
Did this work out for you?
02-06-2008 11:15 PM - edited 02-06-2008 11:16 PM
I think the original question has to do with figuring out whether or not a given control is a typedef or not. I don't think Ben's approach would work in this case. To figure out whether or not a control is a type definition, I recommend using vi.lib\Utility\VariantDataType\GetTypeInfo.vi on the value of the control. If a control is a type def or a strict type def, that fact is reflected in the actual data type of the control. So you can analyze the control's data type to determine whether or not this is the case. Try writing a VI like this:
The GetTypeInfo.vi is available in at least LabVIEW 8.2, maybe earlier.
Let me know if you have any further questions,
-D
02-07-2008 07:01 AM
07-04-2014 02:53 PM - edited 07-04-2014 02:57 PM
That a pretty neat little VI you've found, Darren. Kudos!
The solution that Darren presents, however, will not tell the difference between a typedef and a strict typedef (unless I'm missing something). If you have VI Scripting enabled (see attachment for where to enable this in the Options menu), you can expose the Is Typedef? property.
This returns an enum with the following values (as pictured)
Although this property is not settable in a VI at run-time, it should be readable.
Below is a picture of the Options menu where you can enable VI scripting