LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Barionics

enumerated typecast vi

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.

Could we have the ability to create a custom type def of an array as having an enumerated type for the index?  When I have a lot of data items, I sometimes want to give each item a name, but I find converting clusters to arrays can become clumsy.

5 Comments
Intaris
Proven Zealot

Why not create an I32 enum and use it to index the array?

Barionics
Member

Of course I could do that, but then the link between the item names and the data is not explicit.  I might be tempted to write a small wrapper VI, which takes an enumerated input and returns the data., like in OOP.

cyro
Member
 
 

Have you tried this:

 

Customize your Array with "Advanced" -> "Customize..."

Click "Change to Customize Mode".

Create a U32 Ring, fill it with items and cut into clipboard.

Select the "Index" oy your Array and paste from clipboard.

 

 

Results in this:

 

undefined

 

Maybe this helps... not Enum but Ring (and Ring-Index is accessibel by right-clicking it to generate property nodes and ref nums (Event Structure with Register Node!))

 

 
AristosQueue (NI)
NI Employee (retired)
Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.