LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do You Clear a Tree ?

Hi everybody !

 

I know the question looks deeply simple but i don't know how to clear my tree, I mean every time I run my VI, the elements are added, I would like that when I run my VI, the tree is empty.

 

Thanks !

 

Lucas

0 Kudos
Message 1 of 3
(3,054 Views)

Hi Lucas,

 

there is a DeleteItem method with the tree.

You can also set an empty tree as default value and call the "Reinit to default" method…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(3,035 Views)

Here's the method Gerd was referring to... wiring an empty string will delete all the tree contents:

 

tree.png

 

Note that reinitializing to default will *not* empty the tree, it will only change the selected row(s) back to whatever the default value is (the initial default value of the tree is that no items are selected).

Message 3 of 3
(3,013 Views)