Ni.com is currently experiencing issues that may cause some pages to fail.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event NewVal OldVal doesn't follow TREE tag rename

Solved!
Go to solution

I have a populated TREE control on my front panel. I also use an event structure to track "Value Change" of the TREE.

 

At certain points in my program I will programmatically rename some of the tags in the TREE using the ActiveItem.Tag and Cell String properties. When I do this the TREE visually, updates properly.

 

My problem is, when I click on the renamed elements in the TREE, the OldVal and NewVal data nodes in the event structure reflect the tag names prior to the rename that was performed.

 

I'd appreciate it if someone could steer me in the right direction. Thanks...

Jim Haas
0 Kudos
Message 1 of 3
(3,026 Views)

Hey JHaas,

 

Can you possibly post your code? I have seen some bugs in LabView version 8.5 close to this issue, but I am still unclear about your issue. Thanks!

 

Cheers,

kgarrett

0 Kudos
Message 2 of 3
(2,995 Views)
Solution
Accepted by topic author JHaas

You cannot edit an item's tag using property nodes; if you want to change a tag, use the method EditTreeItems.SetTag.  An item's tag and its cell contents are independent, and all tags must be unique (but cell contents can be identical).  When you set the ActiveItemTag property you're telling LabVIEW which cell to reference, not what the tag should be.

Message 3 of 3
(2,987 Views)