LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copying data between tree controls

I am currently using a tree control to list the tables in a database (with columns as the children under each parent table).  Since I need to duplicate the tree control several times on the front-panel and display the same data in each, is there a simple way to use data from one tree control to populate the others?  While I could get around this problem by writing a subVI and running it for each tree control, it seems as if it would be more efficient in terms of time and memory to build one tree, and then copy it to the others. 

The only other option I can think of is to write a subVI that traverses the template tree and duplicates all tags in the target tree.  The problem with this, however, is I don't see a way to duplicate the display text that was associated with each tag. 

Any suggestions?

Thanks!
Brad
0 Kudos
Message 1 of 6
(3,939 Views)

Hi Brad,

Attached please find a VI that copies a tree control programmatically. I hope you find it useful.

Ankita

0 Kudos
Message 2 of 6
(3,930 Views)
For some reason the attachment did not go through. Re-attaching ...
0 Kudos
Message 3 of 6
(3,918 Views)
Thanks for the great suggestion.  It helped a lot!

Brad
0 Kudos
Message 4 of 6
(3,909 Views)

Hello,

the example is quiet nice, but it don`t copy the tree exactly. If some tags are more than one time in the tree. The shown text differ from the tag name. For example:

test

0 Kudos
Message 5 of 6
(3,763 Views)

Hello,

the example is quiet nice, but it doesn`t copy the tree exactly. If some tags are more than one time in the tree. The shown text differ from the tag name. For example:

test  ->   test

test  ->  test_1

Now i need an exactly copy of a tree and I would do that in a sub vi. Have someone an idea or example for me? Which inputs must I use to pass the tree to the sub vi and back?

 

thankyou  schwede

Message Edited by Schwede on 06-23-2006 03:07 AM

0 Kudos
Message 6 of 6
(3,765 Views)