02-04-2010 05:57 AM
Quick question on how to turn on the type def mode when creating an enum, as the "advanced" option to further go to "customize" is grayed out and disabled. What do I need to do?
thanks
02-04-2010 06:03 AM
02-04-2010 09:26 AM
I assume you mean an enum constant. That is something I struggled with for a while--it seems that it should be possible to type def an enum constant on the BD, because that is important when creating state machines. In the LabVIEW Basic I and II classes, that was stressed as a valuable timesaving tool for future expansion of the structure--always use type def'ed enum constants on the case selector, so you don't need to edit every one of them when you add a case. Apparently, when the instructor said HOW to create that constant, I missed it.
But I looked for the longest time through LabVIEW Help to learn how to do it--either it's not there, or I just wasn't searching on the right key words (most likely). Everything I could find said that type defs can be created for controls and indicators, not constants.
Until I stumbled across the solution you mention, I usually opened a new state machine from the template, and copied the enum from there to use in my VI.
It just seems that such a useful device should be easier to create within the VI. It seems counterintuitive that we need to create a custom control to produce a constant. BTW, I am using LV 8.5, so possibly the newer versions make that more obvious?
Ed
02-04-2010 10:03 AM - edited 02-04-2010 10:06 AM
No. Newer versions of LabVIEW are not yet able to do this. But tst made a right-click plugin to do this here.
You may want to lend your support by going to this idea Create type def from block diagram constant and giving it your Kudos.
02-16-2010 10:20 AM
I find the simplest method is;
One odd thing I find (I'm using LV8.6), when I replace an existing enum const, I seem to have to right-click>>replace twice!
I hope this helps
Regards
Conway