12-29-2008 11:34 PM
Is there any simple way to extract enum item values? I have an enum contain hundreds of items and want to basically just copy enum item values & paste into text file.
For example, assume that my enum contains:
0 AAA
1 BBB
2 CCC
... etc ...
I would like to get those values w/o programming. I already tried copy & paste into a text file, Excel, print VI, string but it didn't display value at all.
Please advice,
12-29-2008 11:50 PM - edited 12-29-2008 11:55 PM
Copy your enum to a new VI and just create a property node for the enum and select the "strings[]" property. It will give you a 1D array of strings.
Here's a simple draft how to create a formatted string, one line/item. Coy/paste from the string indicator or directly write it to a file.
12-29-2008 11:52 PM
c.murphy wrote:
....I would like to get those values w/o programming. I already tried copy & paste into a text file, Excel, print VI, string but it didn't display value at all.
Please advice,
Why without programming?
But have a look at the OpenG toolkit, this usefull set of VIs for all sorts of programming has a special 'enum to strings' VI:
If you create an indicator for 'Enum Strings' you can copy paste that into excel.
Ton
12-30-2008 12:07 AM
Thank you very much. I thought it can be done w/o programming. I'm new to LabView and still try to figure thing out. I appreciate all comments.
12-30-2008 08:17 AM - edited 12-30-2008 08:18 AM
No need to install OpenG to do this, LabVIEW ships with a VI that will do it for you in C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\utility\VariantDataType\GetNumericInfo.vi (replace with your version of LabVIEW as necessary, I believe this has been available at least since 8.2 and maybe since 8.0).
12-30-2008 10:43 AM
12-30-2008 11:31 AM
nathand wrote:No need to install OpenG to do this,
Ah, but you'd be missing out on some interesting stuff...