LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strings between different VI's.

Hi all !

I got a VI that writes a 1D array of strings. (names)
In another VI, I want to display a list with all the strings of the
array of the previous VI.
And when is select this name from that list, the selected string must be
availible.
The problem with LabVIEW seems that it can only work with numbered
lists, and so
a number will be always returned.

In the first VI, I enter the name for different axes of a graph.
In another VI, I can make a list, but I have to select from the names,
used in
that graph.


Please, can somebody help me, I've searched help, but found nothing.
Thanks in advance !

Kristof
0 Kudos
Message 1 of 4
(2,815 Views)
I'm not sure if i understand correctly but it sounds like you are trying to do the following :

You put your 1D array into a listbox and when an item is selected, the item number is returned. You want the item string instead.

There are a couple of ways to do this. Use the listbox like you are currently doing and take the returned number and wire it to the index terminal of the 'index array' funtion. The array terminal can come from either the 1D array or a property node for the listbox. Create a property node and select 'item names' fromt the properties list.

Another way of doing this is to use the enumeration ring instead of the listbox. The returned value of this type ring is the item string. The problem with this is the look will change from a listbox
where all items are viewable at any time to just seeing the currently selected item. To view all itmes in the enumeration ring, just click on it and the full list will appear. after selecting though, you will only see the selected item again. This may not be a problem if you don't mind the way it looks.

Jared
Message 2 of 4
(2,815 Views)
I guess that an enumeration is not valid here because I get the impression that the array of strings is variable. Enums cannot be varied when running the program. So use the number from the listbox to index your string array to return the string.
greetings from the Netherlands
0 Kudos
Message 3 of 4
(2,815 Views)
The attribute-knode can return the text of list-objekts.
Hope that helps.

Niko


> Hi all !
>
> I got a VI that writes a 1D array of strings. (names)
> In another VI, I want to display a list with all the strings of the
> array of the previous VI.
> And when is select this name from that list, the selected string must be
> availible.
> The problem with LabVIEW seems that it can only work with numbered
> lists, and so
> a number will be always returned.
>
> In the first VI, I enter the name for different axes of a graph.
> In another VI, I can make a list, but I have to select from the names,
> used in
> that graph.
>
> Please, can somebody help me, I've searched help, but found nothing.
> Thanks in advance !
>
> Kristof

--
Ingenieurbüro Mencke & Tegtmeyer
Laubbr
eite 21
D-31789 Hameln
Tel. 0 51 51 / 96 33 68
Fax 0 51 51 / 96 33 69
e-Mail: menckeundtegtmeyer@t-online.de
0 Kudos
Message 4 of 4
(2,815 Views)