LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the labview 8.5 project have a search and replace option that appies to all vi's in the project?

In 8.2, the only thing the project has to let you search for a vi is "Find vi's on disk", which is redundant since I can do that in windows explorer.  What I want is a way to search for vi's in my application the way the search and replace function works, except I want it to apply to all vi's in a project instead of just the vi's currently loaded in memory.  Do we have this in 8.5?
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 1 of 5
(3,197 Views)
What kind of search exactly do you want from the project? Do you want to be able to select a VI in the project and perform a "Find All Instances" operation? Do you want to perform a search for LabVIEW objects (ex. For Loop) for all VIs in your project?

In LabVIEW 8.5, there are new features that lets you find the callers and subVIs of a selected VI in a project. From the 8.5 upgrade notes:

• The Find Callers dialog box appears when you right-click an item in
the Project Explorer window and select Find»Callers from the
shortcut menu. Use this dialog box to find all callers of a specific item
in the project. If the item only has one caller, LabVIEW highlights the
caller in the Project Explorer window.
• The Find SubVIs dialog box appears when you right-click an item in
the Project Explorer window and select Find»SubVIs from the
shortcut menu. Use this dialog box to find all subVIs of a specific item
in the project. If the item only has one subVI, LabVIEW highlights the
subVI in the Project Explorer window.
• The Find Items with No Callers dialog box appears when you
right-click the project root in the Project Explorer window and select
Find Items with No Callers from the shortcut menu. Use this dialog
box to find all top-level project items with no callers.
George M
National Instruments
0 Kudos
Message 2 of 5
(3,179 Views)
I'll give an example of what I was trying to do yesterday in 8.2.  I tried to build a source distribution of a large instrument driver.  Since its an instrument driver there is no single top-level vi that contains all vi's - there are different categories of vi's to do different functions on my instrument.  When I'm doing the source distribution I have to do it in several stages since 8.2 doesn't do source distributions right - but thats not really what this post is about.  Anyway, every time I do the distribution I get an error saying CnvrtArrayIntoBitPattern.vi is password protected (and another engineer wrote it and I don't have the password).  So the build fails.  Now I don't know the password, I'll find it out later, but I at least want to know where in the hierarchy this vi is even being called.  I don't know where it is on disk, I don't know what is calling it, it isn't in the project explicitly, it's a dependency.
 
If I had a top-level vi that loaded everything, I could just do a search and replace on that vi and find exactly where it is being called in seconds.  But since I am in a project and have no idea where to start looking, there is no way I can find this vi.  Ideally, in 8.5 there would be a search and replace menu option that searches all vi's in a project to find any calls to this vi.  I want to look for all instances of a vi in my project.  It sounds like you still can't really do that in 8.5.
 
What I ended up doing is writing a vi that opens all vi's in a folder hierarchy on disk.  I don't know where this vi is, but all vi's in my project are in the same root folder.  So I run my program to open every single project vi.  Then since I know every single vi is open and loaded simultaneously I used the search and replace function on one of them to find all instances of CnvrtArrayIntoBitPattern.vi.  But that is a painstaking process to create a simple search function.
 
I think NI is maybe misunderstanding how people are actually using a project.  Not every vi that is being called is going to be explicitly listed in the project.  (Its this same issue that makes source distributions impossible in 8.2 - you can't target dependencies to a support library so every dependency has to be explicitly listed in the project - which is virtually impossible because they are all in different locations and there are hundreds.)  Most people have lots of general purpose vi's they use in many different projects, and they are buried down in code so we aren't even sure where they are all being used.  The new searches you mention assume you already know where the low-level function is and you are looking for their callers.  But sometimes you don't even know where the low level function is.  What if its an NI directory function?  For example, "resample waveform.vi" is an NI function that changed its defaults in 8.2 which meant we had to find every single place we used it and wire "open-interval?" to a constant instead of depending on the default value.  Its in an NI library somewhere and is never listed as a project vi.  So when I needed to find every place through every project that I used this vi, I couldn't do it through  the project manager because there is no search function.  To be practical I add the project-specific vi's to the project, and maybe a couple support directories, but there will always be lots of vi's as dependencies.  But every now and then I'm still going to want to search for one of these vi's.  So in 8.5 there is there still no way to search for vi's that aren't explicitly listed in the project?
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 3 of 5
(3,171 Views)
The Find Callers option in LabVIEW 8.5 will do what you want. There was a change in 8.5 to automatically update the dependency node in the project (In 8.2, you needed to manually refresh the dependencies). So when you load your project in 8.5, all the dependencies of the items in your project are calculated and present under the Dependencies node. Now when you use the new Find Callers option (which can also be invoked via CTRL+F or Edit>>Find Project Items if the project is active) to search for the VI you need to find, CnvrtArrayIntoBitPattern.vi, the results will appear in a dialog (which include the Dependencies node). You can click on the items in the results and find the item in the project. The dialog also show the path on disk of the item. Additionally, there is now a Files view in the project so you can see how the items in a project appear on disk.
George M
National Instruments
0 Kudos
Message 4 of 5
(3,165 Views)
Thats good.  Thanks.
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 5 of 5
(3,151 Views)