Jump to content

"Locate in Project" feature


Recommended Posts

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.

Link to comment

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.

Link to comment

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 ;)

Link to comment

QUOTE(Jim Kring @ Aug 22 2007, 03:53 PM)

:oops: 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).

Link to comment

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,

Link to comment

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.

Link to comment

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.

Link to comment

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?

Link to comment
  • 3 weeks later...

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.

Link to comment

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 :wacko:

Nevermind :laugh:

Link to comment
  • 1 year later...
  • 2 months later...

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.