Comparing VIs using the LabVIEW Command Line Interface

You can use the LabVIEW Command Line Interface (CLI) to programmatically compare two VIs and generate a comparison report listing the differences between the files.

The LabVIEW CLI CreateComparisonReport command compares two specified VIs and outputs an HTML, XML, Word, or text report containing the results of the comparison operation. Use this command to compare VIs without including VI dependencies, preventing missing dependencies from causing errors during comparison.

The table lists the available arguments of this operation.
Argument Required or Optional Description Default
−vi1 Required Name or path of the first VI you are comparing.
−vi2 Required Name or path of the second VI you are comparing.
−reportType Optional Desired file type of the output report. This argument supports the following values:
  • HTML – produces an HTML format report with external images and style file.
  • HTMLSingleFile – produces an HTML form report with embedded images and style definition.
  • MicrosoftWord – produces a report in Microsoft Word format.
    Note Microsoft Word must be installed on your machine for this option to function.
  • PlainText – produces a report in plain text.
  • XML – produces a report in XML format with external images.

If this argument is not specified, it is inferred from the value provided for -reportPath.

HTMLSingleFile
−reportPath Required Name or path of the output report.
−o Optional Overwrites existing reports and supporting files in the specified report directory if they exist.
−c Optional Creates a new directory for the specified report path if it does not exist.
−nofp Optional Excludes front panel differences from the comparison report.
−nofppos Optional Excludes front panel position differences from the comparison report.
−nobd Optional Excludes block diagram differences from the comparison report.
−nobdcosm Optional Excludes block diagram cosmetic differences from the comparison report.
−noattr Optional Excludes VI attribute differences from the comparison report.
-d Optional Compares the specified VIs without including dependencies.

You can choose any arbitrary VI for vi1 and vi2. vi1 is not necessarily the base file, and vi2 is not necessarily a modification of the base file. Within the scope of the comparison report:

  • vi1 is the VI you assign for the initial state (from the state in vi1)
  • vi2 is the VI you assign for the after state (to the state in vi2)
To compare VIs with the CLI for LabVIEW, execute a command with the following syntax:

LabVIEWCLI -OperationName CreateComparisonReport -vi1 <name or path of first VI> -vi2 <name or path of second VI> -reportType <file type of report> -reportPath <name or path of output report>

For example:

LabVIEWCLI -OperationName CreateComparisonReport -vi1 "firstVI.vi" -vi2 "secondVI.vi" -reportType "HTMLSingleFile" -reportPath "report.html"