Detect and Remove Unused VIs in My LabVIEW Project

Updated Aug 13, 2018

Reported In

Software

  • LabVIEW Professional

Issue Details

I want to remove any unused VIs from my project, that aren't actually called or used in my top level main VI.

Solution

The easiest way is to use the build source distribution function within LabVIEW project:

  1. From the Project Explorer window, right-click Build Specifications and select New»Source Distribution from the shortcut menu.
  2. In the dialog box, navigate to Source Files and select to include the top level main VI as Always Included.
  3. In the Destinations category, check the box for Preserve disk hierarchy.
  4. In the Source File Settings category, leave all other source items in the inclusion type as Included if referenced.
  5. Build the source distribution. What comes out is an exact folder structure of VIs that are only included if used.

Additional Information

  • Use source distributions to package a collection of source files. Source distributions are useful if you want to send code to other developers to use in LabVIEW.
  • If you rebuild a given specification, LabVIEW overwrites the existing files from the previous build that are part of the current build. However, if you enable the Auto increment checkbox, or Auto increment product version checkbox for installers, on the Version Information page, and you use the [VersionNumber] or [ProductVersion] tags in the appropriate build destination fields, LabVIEW creates a new directory that includes the version number instead of overwriting the previous build on disk.

WAS THIS ARTICLE HELPFUL?

Not Helpful