LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting a particular cell value from Tree in Front pannel

Solved!
Go to solution

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 ???

0 Kudos
Message 1 of 12
(4,381 Views)

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 

0 Kudos
Message 2 of 12
(4,360 Views)

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

0 Kudos
Message 3 of 12
(4,357 Views)

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

Antoine Chalons

0 Kudos
Message 4 of 12
(4,353 Views)

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

0 Kudos
Message 5 of 12
(4,349 Views)

Hello TiTou,

 

Thanks for the reply. I will check and report you back.

 

Regards

NEO.

0 Kudos
Message 6 of 12
(4,348 Views)

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

Antoine Chalons

0 Kudos
Message 7 of 12
(4,342 Views)

Hi TiTou,

 

Thank you very much...

 

Regards

Neo

0 Kudos
Message 8 of 12
(4,340 Views)

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. 

0 Kudos
Message 9 of 12
(4,322 Views)
Solution
Accepted by topic author Neo6

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 :

 

Clipboard01.png

 

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

Antoine Chalons

Message 10 of 12
(4,317 Views)