LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

For Labview Tree Control, why no navigation choice of 'previous'

I'm using the Tree control in Labview to represent a simple programming model for the Executive of an engineering lab data collection tool. Navigation through the Tree, forward and backward would be useful.
You can find a Parent, a child, the next item, but not the previous one. Did I miss something?
Certified LabVIEW Developer
0 Kudos
Message 1 of 8
(3,689 Views)
Tom,

Do you mean navigation by UI or programmatically? If you select the tree you can use the up/down/left/right arrow pad to navigate through the tree completely.

-Regards,
Brett
0 Kudos
Message 2 of 8
(3,672 Views)
Brett,

Thanks for the answer. I do intend to navigate the Tree programmatically.

Tom
Certified LabVIEW Developer
0 Kudos
Message 3 of 8
(3,669 Views)
Hey Tom,

Maybe I am still a little confused. I guess I had asked that question really thinking you were navigating by user interface. Since you are doing this programatically I am wondering what exactly you are trying to do. Will you know the tag of the item you are trying to go back to??...you could create an array of the tags and use this to help you program a "go back" option in your code. Feed the value at index-1 to the "tag" input on the invoke node.

-Brett
0 Kudos
Message 4 of 8
(3,652 Views)
Brett,

The Tree interface will be used to represent a simple programming language for RF Engineers performing sub-circuit testing. Each item in the tree will perform an instrument setting or measure a parameter. Groups of actions, Loops and condiditionals will control items in their sub-directories, so to speak.

The user will navigate the tree manually to add, edit or remove items. When running the program, I need to programmatically move through the tree to determine what item to execute at a particular time. I'm keeping tight control of the actual tags used.

I've already had to write a special routine to determine what child index I'm currently at to allow me to add a new item before or after the current child location. The same routine will help me get around the lack of a 'previous' navigation method. If I can preserve the autonomy of tree navigation, without any special external jump tables or such, I can allow the user to move items around the tree using the mouse and not have to track the changes. During execution, I'll just track my way through the tree.

If I can come up with the artistic ability required, I'll also build custom symbols that depict the different kind of operations that can be assigned to an item in the Tree. In preparation for that, I designate different kind of program actions to specific symbol indexes.

Storage of the content of the tree is done using config files with the Tree Tags being used as Section names. A default set of Keys is used to describe the Items position in the tree and based on the type of program Item, other Keys are used to describe the specifics of the particular operation the Item represents.

I've also built a Right-Click kind of Context menu that the Users will use to build the programs.

Thanks for your interest,

Tom
Certified LabVIEW Developer
0 Kudos
Message 5 of 8
(3,642 Views)
Tom,

It's not there.

You can make a nice sub vi for it. Get the parend node, and get the next node trough all the children until the input node it found. The previous node is the last input of the loop.

This might be slow, depending on the number of tree items. When I use a tree, I usually keep an internal bookkeeping of the data. This is usually an array of keys, and an array of data. This data could be anything. (e.g. Child text information, previous child, next child, parent, but could also have a vi ref to start when dubble clicked). When a tree is updated (especially the child text) it is very slow. It helps to first check it an update needed by comparing it with the internal information (panel defer off also helps).

Regards,

Wiebe.



"tom.highfield" <x@no.email> wrote in message news:183988@exchange.ni.com...
I'm using the Tree control in Labview to represent a simple programming model for the Executive of an engineering lab data collection tool. Navigation through the Tree, forward and backward would be useful. <br> You can find a Parent, a child, the next item, but not the previous one. Did I miss something?
0 Kudos
Message 6 of 8
(3,635 Views)
Wiebe,

I agree that a parallel table has to be kept to speed things up.

I've already made the vi to locate the existing child index, but thanks for letting me know that I didn't miss a better solution.

Maybe, in future versions, NI will add the 'prev' navigation method and something that reports the current child index.

Tom
Certified LabVIEW Developer
0 Kudos
Message 7 of 8
(3,629 Views)
The extra array of data is what I was getting at for monitoring data and location in the tree and it sounds like you have a SubVI to handle this (which was my other suggestion). I agree that a "previous node" would be a welcome feature. I have included a link to our product feedback website so please feel free to submit a formal suggestion to our R&D department.

Feedback for NI products


Regards,
Brett Burger
Applications Engineering
National Instruments
0 Kudos
Message 8 of 8
(3,615 Views)