Running Operations Using the Command Line Interface for LabVIEW
- Updated2026-03-31
- 2 minute(s) read
You can run a predefined set of operations in LabVIEW by executing commands using the command line interface (CLI) for LabVIEW. For example, use the CLI for LabVIEW to automate the build process of LabVIEW applications. You can also run custom operations that you create in LabVIEW.
Before running an operation using the CLI for LabVIEW, configure LabVIEW to communicate with the CLI for LabVIEW by selecting Tools»Options»VI Server and placing a checkmark in the TCP/IP checkbox.
To run an operation using the CLI for LabVIEW, execute a command with one or more of the following arguments. Required arguments are in bold.
| Argument | Description | Example |
|---|---|---|
| LabVIEWCLI -OperationName | Runs the specified operation. If the operation has additional arguments, append the arguments after the operation name. | LabVIEWCLI -OperationName RunVI -VIPath "C:\Demo Project\RunVI.vi" |
| -AdditionalOperationDirectory | Specifies the directory that stores the necessary files for the operation. This
argument is required only if you run a custom operation and the necessary files for
the operation are not stored in one of the following default directories:
|
-AdditionalOperationDirectory "C:\CLI Operations" |
| -LabVIEWPath | Specifies the LabVIEW version to use to run the operation. This argument is required on macOS and Linux but optional on Windows. On Windows, the default value is the version of LabVIEW that was most recently used on the machine. | -LabVIEWPath "C:\Program Files (x86)\National Instruments\LabVIEW 2018\LabVIEW.exe" |
| -Headless | Runs the specified operation headlessly. Headless operations don't allow user
interaction and don't require a LabVIEW license to execute. Note If you launch LabVIEW headlessly, subsequent LabVIEWCLI
commands don't require the -Headless
argument. |
LabVIEWCLI <Operation> -Headless |
| -PortNumber | Specifies the port of the VI server. This argument is required if the port number under Tools»Options»VI Server»TCP/IP is not 3363. | -PortNumber 3378 |
| -LogFilePath | Specifies the path of the CLI for LabVIEW log file. The default value is the path to the temporary location. | -LogFilePath "C:\temp\log.txt" |
| -LogToConsole | Specifies whether to save the output to both the console and the log file. The
value for this argument must be one of the following:
|
-LogToConsole false |
| -Verbosity | Specifies the level of details to include in the log file. The value for this
argument must be one of the following:
|
-Verbosity Detailed |
Related Information
- Predefined Command Line Operations
LabVIEW includes predefined command line operations to enable automation of tasks like compiling files, building applications, and running VIs.
- Creating Custom Command Line Operations