From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an array list of strings by using buttons?

HI, i need some guidance from you guys to help me out. How do i create a list of array whenever i click on a button it will generate a string and place it in an array row by row. if i dont click on the button it will ignore it and wont create the array. i have tried many technics such as looping and building array but it wont generate the list that i want.
0 Kudos
Message 1 of 22
(4,176 Views)
I am not sure if I have understood your question correctly, but is the attached what you were looking for?
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Download All
0 Kudos
Message 2 of 22
(4,164 Views)
hi adnan, thank you for the reply. i tried to open the example.vi but it seems to have an error. are you using labview v8.6? cause im using labview v8.2.
0 Kudos
Message 3 of 22
(4,159 Views)
Here you go...in 8.2.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 22
(4,156 Views)
when press run the result dint show anything? is it suppose to be empty? cause i click ono male tall short l size and xl size but the array was blank. what should i do?
0 Kudos
Message 5 of 22
(4,153 Views)
Hi adnan thank you very much for the example. i got it to work. but its close to what i want to do. instead of click on it everytime to generate a list , im trying to make it automatically generate. means i just have to select (click) on male tall short s size m size l size just one time and it will automatically generate the list of arrays with all the elements
0 Kudos
Message 6 of 22
(4,149 Views)

All of what elements? Are you trying to create all the permutations? Are there specific combinations you're trying to create? Your original picture seems to imply that you want to create 4 combos:

  • Male, Tall, Short, Small
  • Male, Tall, Short, Medium
  • Male, Tall, Short, Large
  • Male, Tall, Short, Xtra Large

If that is all you want, you just need to create an array: Build Array. If that is not what you want, please explain further.
0 Kudos
Message 7 of 22
(4,128 Views)

all of the elements that are being selected by the on button. nope not all the permutations. actually its like this. i will explain the workings here:

Step 1 : click on the buttons for example click male, tall, short, small , large

Step 2: RUN

Step 3: the array list will show MALE, TALL SHORT, SMALL

                                                 MALE, TALL, SHORT, LARGE

             it will show it automatically

 

0 Kudos
Message 8 of 22
(4,122 Views)
I want to create something kind of a like a family tree. which will automatically create a list based on the buttons i have selected. this is an example of the selected buttons and the actual result that i want to get.
0 Kudos
Message 9 of 22
(4,096 Views)
Well, that is all possible unique non-ordered permutations. You can do this in a brute-force method using 4 nested for-loops. It's not clear how much LabVIEW experience you have - I'm guessing very little. What have you tried so far? I can post a brute-force method that I whipped up, but I'd like to see what you've done so far. The brute-force method will work, but it's not easily scalable.
0 Kudos
Message 10 of 22
(4,056 Views)