LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete unused vi (files) in the project

Hi there,

 

I know that may be an old topic, but I still have no better solution.

 

In my project are not only the vis but other kinds of data, for instance png, mp4...

I didn't use the Auto-populating folders (instead the virtual folders) in the project structure. It' s quite sure that in the folder on the hard drive there should be many vis and files, that are no longer used in the project. 

 

Also some VIs are called dynamically in the main vi, which can not be saved as using the save hierarchy function.

 

I'm not expecting to delete all the VIs, which is not used. But at least to tell which VI is still in use.

 

Any suggestions and ideas?

 

Wilbur

0 Kudos
Message 1 of 7
(6,310 Views)

I made a basic tool vi that compares the 'AllVIsInMemory' output with a recursive directory listing. Everything that wasn't in the AllVIsInMemory was written to a listbox. The delete was performed manually. I also did output the number of 'suspected' files, so I had an isea how clean my project folder was. What I didn't implement but what would be an easy improvement is filtering by extension (so limit to vi, vit, ...).

I don't have this vi with me right now, but it's easy to do your own.

 

Felix

0 Kudos
Message 2 of 7
(6,303 Views)

I cant find it right now, but I did something similar to Felix, but instead of VIs in memory, I listed all the files in a project and compared that to a recursive file listing of a folder.

 

There's a bunch of property nodes and invoke node commands to navigate a project... but as I said, I cant seem to find my old utilitiy right now.

0 Kudos
Message 3 of 7
(6,286 Views)

What if you make a new Source Distribution in your project all active VI's?

I did something similar to export active VI's in an old project and reduced size with 65ish%.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 7
(6,279 Views)

The OP did mention dynamically called vi's, which won't be included in a Source Distribution, although they could be added manually.

Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



0 Kudos
Message 5 of 7
(6,266 Views)

Although the project did away with much of the need for a project tree vo when you have multiple toplevel and dynamic vis a project tree vi still is noce.  Essentially a vi that has all toplevel and dynamic vi on the block diagram.  Now there is a single vi that calls all vis in a project.  It is a useful tool for tracing down dead vis.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 7
(6,256 Views)

Using a source distribution is also a nice suggestion. Using the OpenG builder, it's easy to add the dynamically called vis (as in the App builder and not in the Save As dialog). But I don't know if it allows to preserve folder hierachies. Then you would code the opposite tool of mine that copies all none LV files to the new source distribution.

 

Felix

0 Kudos
Message 7 of 7
(6,234 Views)