Mass Compiling VIs
- Updated2025-04-01
- 3 minute(s) read
When you mass compile VIs, LabVIEW verifies the existence of any subVIs and relinks the subVIs to the main VI. Relinking subVIs to the main VI decreases loading time because LabVIEW does not have to search for those VIs. LabVIEW also updates VIs to the version of LabVIEW you use. LabVIEW detects and reports corrupted VIs, which LabVIEW cannot load. If LabVIEW locates corrupted VIs, you can restore them from a backup.
Certain circumstances, such as upgrading a VI to a newer version of LabVIEW, require LabVIEW to recompile a VI when the VI first loads. LabVIEW continues to recompile the VI each time the VI loads until you save the VI. If you expect LabVIEW to recompile many VIs on load, you might want to compile and save all the VIs at the same time to avoid these tasks at a later time. When you simultaneously compile and save a collection of VIs, you are mass compiling the VIs.
Complete the following steps to mass compile a directory of VIs or an LLB.
- Select Tools»Advanced»Mass Compile to display the Mass Compile dialog box.
- Navigate to the directory of VIs or LLB you want to compile.
- Navigate into a folder and click the Current Folder button to update all the VIs and LLBs in that folder.
- Select a .llb file to update all the VIs in that LLB. Select the open folder icon labeled VI with a single period to the right and click the Select button.
- (Optional) Place a checkmark in the Log Results checkbox and select the desired location to store a log of the mass compile operation.
- (Optional) Place a checkmark in the
Cache VIs
checkbox and enter the number of VIs you want LabVIEW to store in memory. Note Caching VIs can significantly decrease the execution time of a mass compile because LabVIEW does not have to load cached VIs when you compile a top-level VI. However, VI caching consumes more system memory. If you mass compile a folder that contains VIs with the same name in different subfolders and the VIs do not belong to a library, VI caching may cause cross-linking.
- Click the
Mass Compile
button to mass compile the VIs.
Note If you receive messages under the Status tab, open the VI listed. If the VI has an error, fix the error in the VI before trying to mass compile again. - Click the Done button to return to LabVIEW.
When you mass compile VIs, the Status tab of the Mass Compile dialog box displays a log of warning messages for the mass compile operation. For example, the log can report corrupted VIs and VIs that were loaded from the search directories instead of the path specified in the calling VI. You can mass compile to detect unexpected behavior in VIs you compile, such as VIs that break or load from unexpected locations.
You also can use the Mass Compile method or the MassCompile command line operation to load and compile VIs in a directory programmatically.
Mass Compile Operation Order
LabVIEW mass compiles only VIs last saved in a previous version of LabVIEW and VIs with unsaved changes that would result in a recompile when you open them. When LabVIEW mass compiles a directory of VIs, it processes files in the following order at each level of the directory hierarchy:
- LabVIEW project files—When LabVIEW encounters a project, LabVIEW processes the project file, then all files owned by the project in the order they appear in the project tree of the Project Explorer window. Project- and target-specific settings defined by the project such as conditional disable symbols can affect how the files are compiled, such as by specifying the platforms or processor LabVIEW uses to execute the VI.
- Files within subdirectories—LabVIEW processes subdirectories one by one in alphabetical order. For example, if a directory contains folders B and F, LabVIEW processes the files in B in alphabetical order, then the files in F in alphabetical order.
- Any remaining files at that level of the directory, in alphabetical order