LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove auto naming of Child under different parents in tree in LabVIEW

Solved!
Go to solution

I am having child's named "Header" under different parents COM 7 & COM 8.

But when I am taking the current selected tree value, for COM 7, it is coming as Header & for COM 8, it is coming as "Header_1". 

How can I overcome this situation. Because of auto renaming, I am unable to get the value properly.image.png

0 Kudos
Message 1 of 3
(733 Views)
Solution
Accepted by topic author Alwin_Capsys

You are confusing the cell content with the item tag.

The cells can have any string content you wish, while the tag uniquely identifies a tree item (i.e. a row), hence the auto-naming to ensure unicity.

 

Since the "Value Change" event gives you the tag, you have to use the Tree properties to select the tree item (property "ActiveItem.Tag"), then select column 0 (property "ActiveCell.ActiveColumnNumber"), then get the cell content (property "ActiveCell.String"):

 

Get Tree Cell String.png

 

Find your modified VI attached (LV2020):

0 Kudos
Message 2 of 3
(678 Views)
Solution
Accepted by topic author Alwin_Capsys

very much thank you for the reply. I was struggling to get the proper value as it is named automatically. And I was unaware about this property of tree.

0 Kudos
Message 3 of 3
(655 Views)