LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete all rows/clear everything from a MCLB (multi column list box) programmatically.

Solved!
Go to solution

Dear Labview Community,

 

Am trying to reset a MCLB on program start or when needed. I found the invoke node 'reinitiatise to default', but this did not work. Other way that would work would be to do it by resetting everything like symbols, item names etc individually.

 

To reset the content is similar to tables but the symbols still appear. Is there a more straightforward way? 

 

Thank you for your valued responses!

 

 

0 Kudos
Message 1 of 5
(2,860 Views)
Solution
Accepted by topic author rajiv85

To clear the table, use the property  "Item Names" with empty array as input. To clear the symbols, use property node "Item Symbols" with empty array as input.

Certified LabVIEW Architect
Message 2 of 5
(2,841 Views)

Thanks. Eventually this is what I did. 👍

I have another question if you do not mind:

 

After clearing the table, all the rows are empty. So if I will add an element to it, this will not work. I have to initialise the size before hand. But assuming I want to step wise add elements to that table to an unpreditable lenght, this means I do not know what will be the size of the table. Further, if I try to initialise it, then  the symbols appear for all the items instead of only the filled table fields.

 

How to solve this issue? => I mean how to make the table be able to insert step wise any number of elements and put the symbols or row numbers only for the filled items?

0 Kudos
Message 3 of 5
(2,828 Views)
Solution
Accepted by topic author rajiv85

The easy version (not quite recommended, but easier to understand) is to Read the data from the MCLB, Add Array to add a new line and write it back to the MCLB.

Since the UI thread is slow and you shouldn't keep data in indicators; The correct way is to keep the data outside in a shift register, do the same Add array operation and send the result to the MCLB.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 5
(2,807 Views)

@Yamaeda, thank you very much! That was very helpful!

 

 

0 Kudos
Message 5 of 5
(2,789 Views)