LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change row automatically in a ListBox

Hello everyone,

 

So i have a multicolumn listbox full of data, and i have to manipulate the data from the 1st row then manipulate the data from the 2nd row and so on. To do that i can just click on the row and do the operations that i want, but i have more than 4000 rows so i want to know if there is a way to point the first row of my multiculumn listbox do the operations and then automatically point the i+1 row to do the operation automatically.

 

Thank you.

 

Luis.

0 Kudos
Message 1 of 4
(2,349 Views)

@KoalaBeer wrote:

Hello everyone,

 

So i have a multicolumn listbox full of data, and i have to manipulate the data from the 1st row then manipulate the data from the 2nd row and so on. To do that i can just click on the row and do the operations that i want, but i have more than 4000 rows so i want to know if there is a way to point the first row of my multiculumn listbox do the operations and then automatically point the i+1 row to do the operation automatically.


So I thing you are now doing this during edit time?

 

You can make a program to do this automatically. So (optionally) copy the MCL to a new VI and make a program to do this for you. Then paste it back to replace the original.

 

If you want to change the strings in the MCL, get all strings, as an array, with the strings[] property and replace the elements at will (with replace array subset) and set it with the same property. Or simply build an array from a file or constant or control (or anything) and use the property node.

 

You can even in a new VI get a reference to the MCL in the original VI and use the strings[] property to modify it, with VI Server.

0 Kudos
Message 2 of 4
(2,338 Views)

Hi mate, thanks for your answer,

 

Yes i'am doing this during edit time 🙂 

 

So bassically the only option that i have is to pass my data into a simple 2D array, create a subVi to point at index of the next row when the first row is treated and finally "paste" the treated data back into my listbox?

 

Luis.

0 Kudos
Message 3 of 4
(2,032 Views)

@KoalaBeer wrote:

So bassically the only option that i have is to pass my data into a simple 2D array, create a subVi to point at index of the next row when the first row is treated and finally "paste" the treated data back into my listbox?


That doesn't sound very enthusiastic 🙄.

 

You can change the strings of a listbox any way you want. If the listbox is in an existing VI, you can either:

1) Make a VI that edits a copy 'anyway you want', and then paste it back, 

2) Make a VI that opens a reference to the listbox, edit it 'anyway you want'.

 

I'm not sure what 'anyway you want' is exactly.

 

Do you want to type to set the first row, and then hit enter and start typing the next row? It wouldn't be hard to make a VI that does that (implemented as either 1) or 2) ).

0 Kudos
Message 4 of 4
(1,988 Views)