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 following table lists the available arguments of this operation. Required arguments are in bold.
Argument Description Default
−vi1 Name or path of the first VI you are comparing.
−vi2 Name or path of the second VI you are comparing.
−reportType 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 Name or path of the output report.
−o Overwrites existing reports and supporting files in the specified report directory if they exist.
−c Creates a new directory for the specified report path if it does not exist.
−nofp Excludes front panel differences from the comparison report.
−nofppos Excludes front panel position differences from the comparison report.
−nobd Excludes block diagram differences from the comparison report.
−nobdcosm Excludes block diagram cosmetic differences from the comparison report.
−noattr Excludes VI attribute differences from the comparison report.
-d Compares the specified VIs without including dependencies.

To run this operation in 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"