Names 
Author Message
 Names

Hello

How do I convet a string to a name?
I have string (array  of strings) and an integer (array of integers) and
now I want to make an cluster containing my integer (array) so when I
later use the unbundle by name function I can select my integer with
the name given by the string.

/ Peter



Mon, 11 Oct 2004 13:42:51 GMT  
 Names
You have to create a control with the cluster you want. In this
cluster you can name the elements as you want. Save this control as a
strict type def. In your VI create a constant from this control. Then
use bundle by name and connect the cluster input to this control. Now
unbundle by name will display the names.

You can also do the following: Create a cluster constant, place
constants of the right type in it. For each element choose "Visible
Items >> Label" from the context menu and enter the name. Connect it
at as described above.

I prefer the first method because the type def can be used at many
places, e. g. as controls and indicators of subVIs. If any change will
be nesseccary in the future the "Auto update from Typedef" will change
them with no extra effort in all places.



Mon, 11 Oct 2004 20:13:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. What is the name of the function named + ?

2. Alias name vs. folderitem.name

3. DOS File Lookup - just the file name, not the path AND file name

4. field name and key name as a variable

5. field name and key name as a variable

6. A Standard name for .NAME

7. mkdir same name as file name

8. file name vs. real name

9. Named block inside named loop

10. Long name to short name conversion

11. Name spaces - instantiation labels and entity names

12. Name valid outside function, but error name inside function

 

 
Powered by phpBB® Forum Software