LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree sorting

Hello Everyone,
 
         Have anybody used Tree sorter.vi in vi library?
         \Program Files\National Instruments\LabVIEW 7.1\vi.lib\tree\Tree Point Converter.llb\Tree Sorter.vi
         If you have used, can you tell me, what does the inputs 'Tag' and 'Sort specific vi' mean? I could not figure out and the help is not available for this.
 
thanks,
Vasanth.
 
Ya Ya
0 Kudos
Message 1 of 3
(2,922 Views)

Hi Vasanth,

The "tag" input is simply the parent tag in the tree for which you want to sort all the children.  If you want to sort the entire tree, you would enter an empty string here, which is the tag representing the root of the tree.

As for the "Sort Spec VI" input, that is a VI reference to a VI you wish to use to perform the sort.  This VI takes in a reference to the tree control, and two tag names.  You then do whatever you want to do within that VI to figure out which of those two tags should be sorted first, i.e. which tag would appear before the other tag.  You then output a numeric value from the VI, a '1' if the first tag you wired in should be first, or a '2' if the second tag should be first.  I've attached an example Sort Spec VI that I've used in a past project to this e-mail to illustrate how I did my sorting...in my case, my sorting required checking both the cell text of the tag and its glyph.

I hope this helps you get started in the right direction.  Good luck!

-D

Message 2 of 3
(2,902 Views)

Darren,

            Thanks for your inputs. It worked perfectly :-).

Thanks,

Vasanth.

Ya Ya
0 Kudos
Message 3 of 3
(2,885 Views)