06-19-2012 02:49 PM
@Steve Chandler wrote:
Can it really hurt anything by putting a constant on the front panel?
Future version might have more sanity checks, so the code might break or refuse to open in LabVIEW 2020, i.e. at a time when the original programmer has long left the company. 😄
07-03-2012 12:10 PM
Are your boolean constants boring? Try coloring them to match your company's colors.
Use this.
07-03-2012 12:45 PM
Now make the FALSE value show a "T" and the TRUE value show a "F". 😄
07-05-2012 08:45 AM
How's this.
07-10-2012 03:39 PM
We all know that block diagram combobox typedefs constants aren't updated when the typedef is. http://digital.ni.com/public.nsf/allkb/46CC27C828DB4205862570920062C125
If you do have a bunch of them on you BD, make your change to the typedef, then use the Find All Instances and Replace All with the newly updated typedef. I highly recommend going to each one after this using the Find All Instances box and making sure you still have the value you want.
07-10-2012 08:29 PM - edited 07-10-2012 08:30 PM
That is a nice tip but you should really be using typedefed enums instead. As it says in the article you can use format value to get the string for the enum value. But yes that function can take up some room. If that is the concern then just put it in a subVI and make a neat little icon. I always enjoy making icons like the one below for single input single output VIs.
The subVI is just this
07-10-2012 10:04 PM
Steve,
With a small effort you could qualify for the Obfuscated Code thread with that.
Someone was looking for a disappearing wire recently. A modification of Steve's idea allows this:
The Forum appearently will not allow an image with a "?" in the filename. I had called that image "Buried wire?.png" when I created it but the Froum rejected that as an invalid file type.
Lynn
07-11-2012 03:08 AM
@johnsold wrote:
The Forum appearently will not allow an image with a "?" in the filename. I had called that image "Buried wire?.png" when I created it but the Froum rejected that as an invalid file type.
The question mark "?" is often used as a wildcard for a single character and is thus not a good choice in a file name. 🙂 While your file system might allow it, many utilities will choke on such a file.
07-11-2012 06:50 AM
Christian,
I suspected that it was something like that.
One could argue that a question mark or a wildcard of any type might be appropriate for such silly code.
Lynn
07-11-2012 07:51 AM - edited 07-11-2012 07:51 AM
I've been thinking of this some time, but now i did something of it. Sometimes you just want to swap to wires places and the 90 degrees angles can make it problematic to do cleanly, thus the polymorphic Swaparoo! See how you like it. 😄
/Y