LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find not used vi

hello,

i've got an application with 200 vi's.
in the development time there are many vi's created which aren't used any more. is it possible to find these vi's?

markus
0 Kudos
Message 1 of 9
(3,947 Views)
Markus,

Open your top level VI. Save with Options... Development Distribution. This will create a .llb (I think, I haven't done this recently and did not check) with all of the subVIs used in the program. This does not inclued dynamically called VIs (called by reference). This is not a listing of the unused VIs, but gives a consolidated grouping of those which are used.

Lynn
Message 2 of 9
(3,934 Views)
Hi,

Assuming that you have the function names, there a a couple of ways to find SubVIs in LabVIEW:
Start by opening up the top level VI.
1. In the Browse menu choose "Show VI Hierarchi". Ctrl+f will bring up the Find dialog. You should now be able to search through all VIs in memory.
2. The Find dialog can also be accessed from the block diagram.
3. The Browse menu also offers "This VIs SubVIs", which will display all the SubVI icons.

Let me know if you need more help.

Regards

A Meister
NIDK
0 Kudos
Message 3 of 9
(3,932 Views)
Dear Markus,

there are two ways doing that:

1: Copy the toplevel and dynamic loaded VI(s) to a new location. Start LV and load the toplevel VI(s). When LV searches for a subVI copy it from its original location to the new one. You can keep all relative paths. In the "Find xxx" dialog select the new copied VI. You have to do this for each used VI.

2: Load the toplevel and dynamic loaded VI(s) in LV. Make a VI with the attribute Node App.AllVisInMemory. You get an array with all VI names. Go through the array and let you get the pathname of each VI. Sort out any VIs which are located in your LV installation. Then you have the paths of all used VIs.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 4 of 9
(3,927 Views)
thanks for your reply.

it is very time consuming to comopare the list in lv with my folders.
the way i see it i had to program a new application.

my idea for this application is to get all vi pathes and all vi pathes wich are used in my application.
has any one an idea to get the paths of the application vi's?

markus
0 Kudos
Message 5 of 9
(3,925 Views)
Dear Markus,

my reply and your reply was overlapping in time.

The code picture is the kernel of the app you want to write. The string wire coming from left holds the name of the current VI. The case to the right will hold the code what you want to do for each VI. Here you can place code to copy the VI from its old location to a new location.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 6 of 9
(3,914 Views)
A trick, with some drawbacks, is to open your top level vi, and while holding the shift and the Ctrl keys, click on run. It will show the hour glass for sometime (the more sub-vi's the longer). When the hourglass goes away the vi won't be running, and if you select "Close" in the file menu you will see a message telling you that many vi's need to be saved. If you select to save the sub-vi's they will all be given the same time stamp, which makes sorting them out much easier. The previously mentioned drawbacks are: 1) you loose the individual timestamps, which might be important in tracking your work, 2)it does this to "all" the vi's loaded in memory, so even ones in the native LabVIEW directories will have their timestamps changed. 3)It doesn't do this to those vi's that are dynamically loaded.

A technique to help with #1 is to make a copy of the that you are doing your development work in, perform this on the copy and then use a listing of the new directory (or delete all the ones in the new directory with the new timestamp) to look for those used/not used. It doesn't answer the issues of 2 and 3 though.


Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 7 of 9
(3,910 Views)
Hi handle this issue by using a "tree.vi" that contains all of the top level VI's in a project, both static and dynamic calls.

I can then do a Save with options to new location, and uncheck the vi.lib stuff.

This gives me a fresh folder with only the VI's tha are used by the app.

The main draw back to this appraoch is it does not include any support files like config files etc.

Ben

PS Sign up as a Beta tester to find out how this will be easier in the future.
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(3,881 Views)

@WeberM wrote:
i've got an application with 200 vi's.
in the development time there are many vi's created which aren't used any more. is it possible to find these vi's?


For a general housekeeping utility, you may want to look at E. Blasberg's "Find All Used & Unused VIs". A description of it is in the InfoLabVIEW archives at http://messages.info-labview.org/2004/05/31/05.html and it can be downloaded from here.
It uses methods described by others above.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 9 of 9
(3,871 Views)