LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree array: How to edit item for an array element

Hi,
I have an array of tree controls. I need to get the reference of i-th tree in order to edit items. I used
array IndexVals property to select the element and array ElemRef property to get the element reference but
when I try to modify the i-th tree all trees inside array are modified. If I use this technic on an array of strings it works?
Someone can help me?
Thanks a lot
Federico
0 Kudos
Message 1 of 8
(3,644 Views)
I could be wrong, but the problem is that all elements in an array must be the same. If you say you are editing a tree, you are changing a control in the array and all other controls will change. The values that each tree outputs will be different, but the items in the tree cannot be.
0 Kudos
Message 2 of 8
(3,636 Views)
Elements in an array must all be identical, except for their value.
 
You can change the value of an element in an array of string. You are trying to change individual properties of array elements.
 
Why does it need to be an array of tree controls? Maybe you could use a cluster of tree controls, or just a few individual tree controls for your purpose?
0 Kudos
Message 3 of 8
(3,637 Views)

Thank you all.

I konw that my english is not good, so please be patient.The point is that I have to manage a dynamic number of report tamplate .doc. I thougth to use a single tree to manage relations between test data-entry and report bookmark. One tree one template and one data-entry N bookmarks: the tree could be the rigth data structure to storage configurations and increase search speed during report generation.

Federico

0 Kudos
Message 4 of 8
(3,629 Views)
Instead of an array of trees, make it an array of clusters, each cluster containing one tree. You have to go through the hassle of one extra reference or dereference to get to the trees, but changing one tree will no longer affect all of the other trees.
0 Kudos
Message 5 of 8
(3,576 Views)
I'm sorry but It doesn't work.
Federico
0 Kudos
Message 6 of 8
(3,450 Views)
Hello Fede,
 
An array control/indicator has the same set of properties/methods associated with each element. Then it is not possible to change only a part of element properties; what I can suggest is to use a single tree control instead of an array, with a template layer related to your .doc file list.
 
Let me know if I have well understood your problem.
 
Best regards,
 
Fabio
Fabio M.
NI
Principal Engineer
0 Kudos
Message 7 of 8
(3,422 Views)
Hi Fabio,
You did understand my problem.
Using only one tree It's more complicated for me, because I have to make a difference between tag (unique) and item string.
Just this.
Thank you a lot.
Ciao
Fede
0 Kudos
Message 8 of 8
(3,406 Views)