03-08-2013 08:12 AM - edited 03-08-2013 08:12 AM
Hello All,
Let me descibe my problem in a simple way
I have a tree strucure on front pannel with 2 coloumns and 20 rows. I have populated all the attributes of a camera into this tree. First coloumn contains name of attributes of camera, second coloumn is their values. I want to use value of 'frame size' attribute in my program to make initial memory allocation.
How can I extract a particular attribute value from tree structure ??? I have refered to the below thread, but it describes to extract row on 'ActiveIteamTag' ( I didn't get that concept).
http://forums.ni.com/t5/LabVIEW/Reading-second-column-in-Tree-control/td-p/421668
can anyone have a simple solution for extracting a value from tree ???
Solved! Go to Solution.
03-11-2013 05:26 AM
Hello all,
to explain in single sentence , I am trying to extract one attribute from the attributew tree in this example 'Grab and Attributes setup.vi' in labview examples. Any idea how to extract a single attribute vale from attribute tree ?
Thank you
03-11-2013 05:50 AM
Hello!
Why do you use a tree structure instead of an array or a table structure?
I found an example discussing tree structures in the help database of LabVIEW 2012
http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/creating_tree_controls/
Best regards
Raphael
03-11-2013 06:05 AM
for adavnced tree control use I suggest taking a look at Ton's variant probe posted on the LAVA Code Repository (LAVA is down rigt now, so I can't give the link)
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
03-11-2013 06:29 AM
Hello Lorenz-Mile,
Thank you for your reply. In my opinion tree controls gives a good hierarchy for grouping items of similar class and good user Interface. I have gone through the link you provided. It explains how to build a tree, editing items and so on. I havent seen anything related for extracting a particular value from tree control.
Hope you understand my problem. Please forward me if you have any info regarding value extraction.
Thnk you
Regards
NEO
03-11-2013 06:30 AM
Hello TiTou,
Thanks for the reply. I will check and report you back.
Regards
NEO.
03-11-2013 06:45 AM
Here's the variant probe package (you'll need VIPM to install it), to look at the code you need to open the XControl inf the user.lib.
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
03-11-2013 06:47 AM
Hi TiTou,
Thank you very much...
Regards
Neo
03-12-2013 04:32 AM
Hello TiTou,
I have gone through the link (Ton's variant probe posted on the LAVA Code Repository). It seems like Labview hardcore programming . I just a beginner in Labview. Do I really need to go through this advanced stuff to read out a valur from tree control ? Reading out a value from tree is really that advanced task ?? Do you have any other solution ?
Regards
NEO.
03-12-2013 05:52 AM
Hi,
No, of course you don't have to go into this advanced programming.
The tree control is quite powerfull and not always easy to deal with.
To go back to your original question, in order to read a specific attribute from the tree in the example you are refering to, here's what you can do :
One thing that is a bit tricky with trees is that you can have many time the same cell value (displayed string) but each "line" of the tree has a unique tag, in this example the VIs that fill-up the tree use a sort of "path" with "::" as separator.
Hope this helps
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus