01-13-2006 10:03 AM
01-13-2006 10:06 AM
Hi Wacek,
There are two things you can do to speed this up. One is to use the "Defer Panel Updates" property of the Panel to turn off updating of the panel until the entire tree is populated. After the tree is populated, you would then disable Defer Panel Updates. This is a property of the Panel class, so you can search the LabVIEW Help for "Defer Panel Updates" to learn more. It basically involves putting a property node before and after your tree population code.
Another thing you can do is add all the tags to your tree at once with the "Add Multiple Items to End" method of the tree control. This is a new method for the Tree in LabVIEW 8.0, and my understanding is that it is much, much faster at adding items to a tree than doing it one at a time. Again, check the LabVIEW Help for more information about this method.
Hope this helps,
-D
01-13-2006 03:12 PM
01-13-2006 03:22 PM
01-13-2006 05:05 PM
01-16-2006 11:38 AM
This doesn't sound right at all. When updating a Tree control without defer panel update enabled you spend a large amount of your time in redrawing the tree control. So using defer panel update should definitely get you more time savings. However there is of course another time delay here if you seem to use an SQL database to get the values. SQL queries can get very slow if not down with paramtrized queries or such, so you might want to look at that part as well.
@Wacek wrote:
Thank you Darren for quick answer. The "Defer Panel Updates" property reduced the tree population time about 0.5 minute. So it is still above 3 min - too long.
I tried the "Add Multiple Items to End" method but without success. I can not find any example with this method. Also in LabVIEW Help is not enough info about it .
Wacek
04-17-2006 10:40 PM
04-18-2006 01:17 PM
05-05-2006 08:26 AM
Dear Jarrod and the others,
I took your VI and I tried to modify it a little bit for one of a customers. He noticed the problem discussed in this post. He is working with LV 7.1 and thus, he knows he can't employ the properties 'Add multiple items at a time'. I rewrote the VI for him and tried to do the little modifications he want... But I can't do that and I'm afraid....
He want to do that : The tree is created without front panel update. The user checks the correct parent and select it by a double-click (who is linked to an event structure). Then the program rewrites the tree with only the selected parent and his children. I do that but it's not completed because I can't find the position of the selected item !
Anyone of you can help me???
Thanks a lot,
06-14-2006 09:47 AM