Predefined Command Line Operations
- Updated2025-08-15
- 7 minute(s) read
The command line interface for LabVIEW supports the following operations:
- MassCompile — Mass compiles the files in the specified directory.
- ExecuteBuildSpec — Builds an application or a library using the settings in the specified build specification(s) and returns the path of the output files.
- RunVI — Runs a VI with the predefined connector pane interface and returns the output or error information.
- CloseLabVIEW — Closes LabVIEW without any prompts.
- CreateComparisonReport — Generates a VI comparison report for two specified VIs.
- (VI Analyzer Toolkit) RunVIAnalyzer — Runs the specified VI analyzer task in the LabVIEW VI Analyzer Toolkit and saves the test report to the specified location.
- (Unit Test Framework Toolkit) RunUnitTests — Runs tests on the specified files in the LabVIEW Unit Test Framework Toolkit and saves the JUnit file to the specified location.
You can also create custom operations to run in LabVIEW.
MassCompile
Mass compiles the files in the specified directory.
The following table lists the available arguments of this operation. Required arguments are in bold.
To run this operation in the CLI for LabVIEW, execute a command using the following syntax:
LabVIEWCLI -OperationName MassCompile -DirectoryToCompile < directory of file(s) > -MassCompileLogFile < path to log file > -AppendToMassCompileLog < true or false > -NumOfVIsToCache < number of VIs to cache > -ReloadLVSBs < true or false >
For example, LabVIEWCLI -OperationName MassCompile -DirectoryToCompile "C:\temp" -MassCompileLogFile "C:\temp\log.txt" -AppendToMassCompileLog true -NumOfVIsToCache 0 -ReloadLVSBs false
ExecuteBuildSpec
Builds an application or a library using the settings in the specified build specification(s) and returns the path of the output files.
The following table lists the available arguments of this operation. Required arguments are in bold.
| Argument | Description | Default |
|---|---|---|
| −ProjectPath | Path to the LabVIEW project .lvproj file that contains the build specification. | — |
| −TargetName | Target that contains the build specification. | My Computer |
| −BuildSpecName | Name of the build specification that appears under Build Specifications in the Project Explorer window. | Empty string—The CLI for LabVIEW builds all build specifications under the specified target. |
To run this operation in the CLI for LabVIEW, execute a command with the following syntax:
LabVIEWCLI -OperationName ExecuteBuildSpec -ProjectPath < path to project > -TargetName < name of target > -BuildSpecName < name of build specification >
For example, LabVIEWCLI -OperationName ExecuteBuildSpec -ProjectPath "C:\temp\test.lvproj" -TargetName "My Computer" -BuildSpecName "My DLL"
RunVI
Runs a VI with the following connector pane interface and returns the output or error information.
| Terminal | Data Type | Description |
|---|---|---|
|
|
|
Command line arguments for the VI. |
|
|
|
CLI for LabVIEW exit code that the VI returns. |
|
|
|
Output or error information to include in the CLI for LabVIEW console or log file. |
The following table lists the available arguments of this operation. Required arguments are in bold.
| Argument | Description | Default |
|---|---|---|
| −VIPath | Path to the VI to run in LabVIEW. If the connector pane of the VI does not match the predefined interface, the CLI for LabVIEW returns an error. | — |
| < Command line arguments for the VI > | Elements of the input array of the VI. Separate elements with spaces. | — |
To run this operation in the CLI for LabVIEW, execute a command with the following syntax:
LabVIEWCLI -OperationName RunVI -VIPath < VI path > < first element of array > < second element of array >...
For example, LabVIEWCLI -OperationName RunVI -VIPath "C:\Users\inlabview.APAC\Documents\DemoProject\RunVI.vi" 101 202
CloseLabVIEW
Closes LabVIEW without any prompts.
This operation does not have any arguments.
To run this operation in the CLI for LabVIEW, execute the following command:
LabVIEWCLI -OperationName CloseLabVIEW
CreateComparisonReport
Compares two specified VIs and outputs an HTML, XML, Word, or text report containing the results of the comparison operation.
| 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:
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"
RunVIAnalyzer
Runs the specified VI analyzer task in the LabVIEW VI Analyzer Toolkit and saves the test report to the specified location.
The following table lists the available arguments of this operation. Required arguments are in bold.
| Argument | Description | Default |
|---|---|---|
| −ConfigPath | Path to the configuration file that contains VI Analyzer task settings to use in the analysis. You can use a configuration file you saved through the VI Analyzer or the VI Analyzer VIs. Alternatively, you can specify a VI, folder, or LLB to analyze. If you specify an item other than a configuration file, the VI runs all VI Analyzer tests on the specified item. | — |
| −ReportPath | Path to the report file. | — |
| −ConfigPassword | Password of the configuration file, if any. | Empty string |
| −ReportSaveType | Format of the report or results file. The value for this argument must be one
of the following:
|
ASCII |
| −ResultsPath | Path to the results file. If the path is an empty string, LabVIEW ignores this
argument. Note This argument is case
sensitive. |
— |
To run this operation in the CLI for LabVIEW, execute a command with the following syntax:
LabVIEWCLI -OperationName RunVIAnalyzer -ConfigPath < path to configuration file > -ReportPath < path to report > -ReportSaveType < file type of report > -ConfigPassword < password of configuration file >
For example, LabVIEWCLI -OperationName RunVIAnalyzer -ConfigPath "C:\temp\test.viancfg" -ReportPath "C:\temp\output.html" -ReportSaveType "HTML" -ConfigPassword "abc"
RunUnitTests
Runs tests on the specified files in the LabVIEW Unit Test Framework Toolkit and saves the JUnit file to the specified location.
The following table lists the available arguments of this operation. Required arguments are in bold.
| Argument | Description | Default |
|---|---|---|
| −ProjectPath | Path to the project file. | — |
| −JUnitReportPath | Path to the output JUnit file. | — |
To run this operation in the CLI for LabVIEW, execute a command with the following syntax:
LabVIEWCLI -OperationName RunUnitTests -ProjectPath < path to project file > -JUnitReportPath < path to output JUnit file >
For example, LabVIEWCLI -OperationName RunUnitTests -ProjectPath "C:\temp\test.lvproj" -JUnitReportPath "C:\temp\test.xml"
Related Information
- 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.