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.
已解决! 转到解答。
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"):
Find your modified VI attached (LV2020):
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.