The Compare VIs dialog box helps you track changes in an application by comparing multiple versions of a VI using graphical differencing. Version control becomes more important as a project grows and involves more developers.

LabVIEW cannot load two VIs with the same name. You must rename one of your VIs to compare them. Renaming the VIs does not affect the name of the subVIs. If you compare two hierarchies of VIs, LabVIEW temporarily renames the top-level VI.
  1. Open a LabVIEW project.
  2. Select Tools»Compare»Compare VIs from the front panel or block diagram menu of a VI to display the Compare VIs dialog box.
  3. Click Select to open the Select a VI dialog box and select a VI by name. You can only select VIs that are already loaded into memory.
  4. Select comparison options in the Differences dialog box.
  5. Click Compare.
Note The progress bar indicates the steps in the comparison algorithm, not the number of differences left to find.
Note Use the same steps to compare private data controls of LabVIEW classes. You must place each version of the class in a different project and enter the project paths into the VIs to Compare text fields using the following syntax: ProjectName.lvproj\My Computer\ClassName.lvclass:ClassName.ctl.

Comparing very large VIs can be time consuming. You can cancel the comparison of two VIs in the Comparison Progress dialog box.

When the comparison is complete, LabVIEW displays the front panels and block diagrams of the two VIs along with the Differences dialog box. You can specify the types of differences you want to detect and view in the Differences dialog box. For example, you can filter out cosmetic changes such as objects being moved or resized. If you select an item from the summary, LabVIEW displays and highlights the differences between the two VIs.

Note LVCompare.exe also uses the Compare VIs dialog box to compare VIs using a third-party source control provider or from the command line.
After the comparison is complete, you can create a VI comparison report by clicking More Commands » Create Report in the Differences dialog box. In the Create Report dialog box, select a report type and specify a filepath to save the report as:
  • A web page (.html)
  • An XML document (.xml)
  • A text file (.txt)
  • A Microsoft Word document (.docx (Windows)).
Note The file path for saving the comparison report must be a local directory instead of a network path.

You also can create a comparison report when you compare VI hierarchies.