Comparing VIs using the LabVIEW Command Line Interface
- Updated2026-05-01
- 2 minute(s) read
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.
| 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:
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)
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"
Related Information
- Merging VIs
You can reconcile different sets of changes to the same VI with the merge VIs functionality in LabVIEW.