08-01-2007 08:26 AM
09-25-2009 10:23 AM
Re: I have been unable to find a way to take a default boolean control right off the palette and create and show a caption or switch to multiple strings programatically.
In fact, th "Multiple Text String" property node can be enabled by installing the LabVIEW Scripting toolkit.
07-01-2011 11:03 AM
I found this thread while searching for an answer to a related problem...
Booleans such as the OK Button don't have Multiple Text String enabled by default.
If you are using Scripting to create booleans, there is an option to enable Multiple Text Strings, but it seems to throw an error.
Is this a bug with LabVIEW 2010 / Scripting or am I doing something wrong here??
07-01-2011 11:14 AM
I usually create a cluster containing all my references so that their data types are preserved. Alternately, you can use To more specific class to coerce to the appropriate class when you use the references.
07-01-2011 11:27 AM
Hi DFGray - thanks for the quick reply!
The class of the reference is ok - I am using 'to more specific class', and all the other boolean specific properties are working.
The only one that's throwing an error is when I try to enable (or disable) Multiple Strings.
I have thought of a workaround though - instead of my script creating generic Boolean controls, I will try to create boolean controls based on a template, and ensure that Multiple Strings is enabled in that template. This might work, hopefully... 🙂
(I still think it's a bug in LabVIEW though)
07-01-2011 11:33 AM
If I remember correctly, some boolean control styles do not support multiple strings. Try creating the boolean with a different style. I will admit it has been awhile since I did this, so I could be wrong.
07-01-2011 11:52 AM
Here's another 'workaround' 😉
It seems that LabVIEW only throws an error once! If you try the same thing again, it works ok the second time!!
It's not exactly logical so don't ask me how I discovered it!
See the image attached.
At probe 18, there is no error.
Then the error occurs (code 2) after the first Property Node. I clear this error using the Clear Specific Error vi (a very handy VI located in vi.lib\addons\_NISVFA\_Shared subVIs\Common\svc_Clear Error Cluster for Specific Code.vi)
When I use the same Property Node the second time, there is no error and the Boolean is updated properly!
I tried this in LV 8.6 and it shows the same behavior.
Those LabVIEW guys at NI have a sense of humor alright! 🙂