LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get edited Tree Child Values?

Hi,
 
I want to write a cluster of unknown size to a tree, to display the information.
Then I want to edit the values of a string, double, int ....., in the tree.
 
But I just find no way to get my information back into the cluster to work with it.
 
I have attached a vi where you can see the information in the tree. I hope someone can help me :).
 
 
0 Kudos
Message 1 of 3
(2,808 Views)
This isn't easy, but certainly possible.

Pass a reference to the cluster to a sub VI (or in the main, but it will get
messy!). Then get all controls from a property node. In a for loop, you can
set the value of each element in the array one by one. Tricky part is that
you have to set a variant. So you'll have to convert the string that is
edited in the tree, to the correct type, then convert that to a variant, and
put it in the Value[] property of the cluster element. You can also cast the
reference to the cluster element to it's type, and convert the string from
the tree to the same type, and wire them together. But note that some types
are the same, while casting one to the other will fail.

This (potentially very complex) VI acts as a local to the referenced
cluster. That means that the value that this VI sets, could be overwritten
by any other local that writes to it. So you need a solid framework to
prevent that.

Regards,

Wiebe.


0 Kudos
Message 2 of 3
(2,801 Views)
Hi, first thx for your help.
Can you complete my vi postet  with your answer? I don't know how i should do :).
In the mean time I think my main problem is lying in the fact that the values of my units are written in the child text, not in a own child tag.
 
Best regards,
Martin
 
0 Kudos
Message 3 of 3
(2,777 Views)