Michael Aivaliotis Posted August 23, 2007 Report Share Posted August 23, 2007 I would like to see the ability to locate a VI in the project tree. One way to expose this would be to right-click on a VI Icon (on the diagram or top-right corner icon) and select "Locate in Project" from the menu. This would open the project tree and highlight the VI in the tree. Quote Link to comment
orko Posted August 23, 2007 Report Share Posted August 23, 2007 This would be very nice, indeed. :thumbup: It shouldn't require too much to implement either, since there is already a "Find Project Items" utility in the Project Explorer "Edit" menu that does almost everything that you want. It just isn't available anwhere in the VI menus. Nice idea about searching for the current VI by right clicking the VI icon. Quote Link to comment
Jim Kring Posted August 23, 2007 Report Share Posted August 23, 2007 Ask and you shall receive... Place Locate in Project.vi in the <LabVIEW>\wizard folder (create the folder if it doesn't exist), restart LabVIEW, and then you'll have a File>>Locate in Project menu item that works as advertised. :thumbup: http://forums.lavag.org/index.php?act=attach&type=post&id=6719 Cheers, -Jim Quote Link to comment
orko Posted August 23, 2007 Report Share Posted August 23, 2007 QUOTE(Jim Kring @ Aug 22 2007, 02:50 PM) Ask and you shall receive... That works awesome, Jim! Tested in LV8.2.1 and LV8.5. A little slow in larger projects, so the only suggestion I have is to wire a True to the "ExcludeDependancies" and "ExcludeBuilds" node of the "GetAllDescendants" property. This sped up my search time considerably. Quote Link to comment
Jim Kring Posted August 24, 2007 Report Share Posted August 24, 2007 QUOTE(orko @ Aug 22 2007, 03:26 PM) That works awesome, Jim!Tested in LV8.2.1 and LV8.5. A little slow in larger projects, so the only suggestion I have is to wire a True to the "ExcludeDependancies" and "ExcludeBuilds" node of the "GetAllDescendants" property. This sped up my search time considerably. Post your improvements, Joe! That's how open source works Quote Link to comment
orko Posted August 24, 2007 Report Share Posted August 24, 2007 QUOTE(Jim Kring @ Aug 22 2007, 03:53 PM) Post your improvements, Joe! That's how open source works I thought I had! Here you go... http://forums.lavag.org/index.php?act=attach&type=post&id=6720''>http://forums.lavag.org/index.php?act=attach&type=post&id=6720'>http://forums.lavag.org/index.php?act=attach&type=post&id=6720 (LV8.2) One thing that also would be nice is to stop the FP of the top level VI from popping up. Does anyone else see this happening? 1) Close everything. 2) Open a project 3) Open a typedef control 4) Select File->Locate in Project" 5) I'm seeing my top level VI of my project heirarchy open up before the search is finished. I don't see a way to suppress thes behaviour (yet). Quote Link to comment
Jim Kring Posted August 24, 2007 Report Share Posted August 24, 2007 QUOTE(orko @ Aug 22 2007, 04:06 PM) One thing that also would be nice is to stop the FP of the top level VI's from popping up. I don't see a way to suppress that though (yet). Can you explain what you mean by this? Do you mean the top-level VIs in the project, the menu-launch VI, or something else? Thanks, Quote Link to comment
orko Posted August 24, 2007 Report Share Posted August 24, 2007 QUOTE(Jim Kring @ Aug 22 2007, 04:21 PM) Can you explain what you mean by this? You caught me in the middle of an edit on my post I've provided a clearer explanation (hopefully) above. For instance, if I have: Main.vi calls SubA.vi which is using Typedef1.ctl Opening up Typedef1.ctl and Locating in the project opens up Main.vi's FP. Quote Link to comment
Jim Kring Posted August 24, 2007 Report Share Posted August 24, 2007 QUOTE(orko @ Aug 22 2007, 04:27 PM) You caught me in the middle of an edit on my post I've provided a clearer explanation (hopefully) above.For instance, if I have: Main.vi calls SubA.vi which is using Typedef1.ctl Opening up Typedef1.ctl and Locating in the project opens up Main.vi's FP. This is because your top-level VI is set to Open Front Panel When Loaded. The ProjectItem.VIReference property that is being used in the utility opens a reference to each project VI in order to get its fully qualified name (with library prefix, if a member of a library). You can't simply use the project item name, since it might be a member of a library/class/xcontrol/etc. There is a ProjectItem.VIReference(NoLoad) property that can be used in 8.5 (which doesn't actually open a reference to a VI if its not already loaded into memory), but this property doesn't exist in 8.2 Here is a version that should work in 8.5 without opening the FP of VIs set to Open Front Panel When Loaded. http://forums.lavag.org/index.php?act=attach&type=post&id=6722''>http://forums.lavag.org/index.php?act=attach&type=post&id=6722'>http://forums.lavag.org/index.php?act=attach&type=post&id=6722 Quote Link to comment
gmart Posted August 24, 2007 Report Share Posted August 24, 2007 Just in case this was missed, with a project window active, you can press CTRL+F (Edit>>Find Project Items..) and the "Find Project Items" dialog will come up. In the dialog, you type the name of the VI and press Find and you will get a list of all the items that match the search text. You can then double-click on the result and it will be located in the project. This works for any project item, not just VIs. In addition, in a project, you can right-click on a project item and select Find Callers or Find SubVIs. Quote Link to comment
orko Posted August 24, 2007 Report Share Posted August 24, 2007 I created a new version that goes about this in a different way http://forums.lavag.org/index.php?act=attach&type=post&id=6738 (LV8.2) It uses the private project method "Get Project Item From VI Ref", which is available in both 8.2 and 8.5. There is no loop needed for this, so it sped up the search time considerably on large projects. It will find all VIs in the project, regardless of if they are in library/class files (without opening up VIs set to "Open FP on Load"). It also will tell you when there is no active project window open, or if the VI wasn't found in the active project. Any ideas for further improvement? Quote Link to comment
Jim Kring Posted September 13, 2007 Report Share Posted September 13, 2007 QUOTE(orko @ Aug 23 2007, 01:13 PM) Any ideas for further improvement? Currently, Dependencies are excluded from the search. However, I'm finding that I really want to include them in the search. Fixing this is just a matter of setting ExcludeDependencies = FALSE when calling the MyComputer.GetAllDescendents() method. Quote Link to comment
orko Posted September 13, 2007 Report Share Posted September 13, 2007 Did you try the latest version above that I posted? It goes about the search in a different way (and speeds it up considerably). Does that method find everything that you want, including dependancies? (I can look but it won't be until tomorrow) Quote Link to comment
Jim Kring Posted September 14, 2007 Report Share Posted September 14, 2007 QUOTE(orko @ Sep 12 2007, 01:30 PM) Did you try the latest version above that I posted? It goes about the search in a different way (and speeds it up considerably). Does that method find everything that you want, including dependancies? (I can look but it won't be until tomorrow) Oops... I thought I had the latest version, but nope Nevermind :laugh: Quote Link to comment
lvb Posted December 6, 2008 Report Share Posted December 6, 2008 Where did the App:Project.ActiveProject property node come from? I have been looking for this feature for since the project was introduced. It definitely is not in the NI Class Browser. Quote Link to comment
orko Posted December 6, 2008 Report Share Posted December 6, 2008 QUOTE (brianafischer @ Dec 5 2008, 11:03 AM) Where did the App:Project.ActiveProject property node come from? I have been looking for this feature for since the project was introduced. It definitely is not in the NI Class Browser. http://forums.lavag.org/VI-Scripting-Readme-First-t1207.html' target="_blank">SuperPrivate... The ini keys will unearth these blue property nodes. :ninja: Quote Link to comment
Jim Kring Posted December 6, 2008 Report Share Posted December 6, 2008 QUOTE (brianafischer @ Dec 5 2008, 11:03 AM) Where did the App:Project.ActiveProject property node come from? I have been looking for this feature for since the project was introduced. It definitely is not in the NI Class Browser. If you aren't able to see it, it's probably http://forums.lavag.org/VI-Scripting-Readme-First-t1207.html' target="_blank">scripting (a.k.a. a private VI Server feature). Quote Link to comment
rkesmodel Posted March 5, 2009 Report Share Posted March 5, 2009 QUOTE (Michael_Aivaliotis @ Aug 22 2007, 01:39 PM) I would like to see the ability to locate a VI in the project tree.One way to expose this would be to right-click on a VI Icon (on the diagram or top-right corner icon) and select "Locate in Project" from the menu. This would open the project tree and highlight the VI in the tree. Great idea, Michael. I would like to see the reverse functionality. Right click on the vi name or icon (yes, I'd like to see small versions of the ACTUAL icons) in the project tree (Items or Files view) and "Find all instances" just like we can in VI Hierarchy view. We can "Find - Callers" and "Find - SubVIs". Why not "Find - All Instances"? I have not only submitted this to NI, but also mention it to every support tech I talk to, so they will submit it. Roy Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.