Running Operations Using the Command Line Interface for LabVIEW

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

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. Refer to the LabVIEW Readme, located in the labview\readme directory, for a list of known issues that you may encounter when running operations using the CLI for LabVIEW.

Note Note  The CLI for LabVIEW is available as a separate package. Refer to the NI website for more information about downloading the CLI for LabVIEW and compatible versions of 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.

Note Note  All the arguments are case-sensitive.
Tip Tip  To learn more about getting started using the CLI for LabVIEW, execute the LabVIEWCLI -Help command. To learn more about a specific operation, execute the LabVIEWCLI -OperationName <operation name> -Help command. For example, execute the LabVIEWCLI -OperationName RunVI -Help command to learn more about the RunVI operation.
ArgumentDescriptionExample
LabVIEWCLI -OperationNameRuns 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"
-AdditionalOperationDirectorySpecifies 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:
  • (Windows) C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI\Operations
  • (macOS) /Library/Application Support/National Instruments/LabVIEW CLI/Operations
  • (Linux) /usr/local/natinst/nilvcli/Operations
-AdditionalOperationDirectory "C:\CLI Operations"
-LabVIEWPathSpecifies 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 most recent version of LabVIEW used on the machine.
-LabVIEWPath "C:\Program Files (x86)\National Instruments\LabVIEW 2018\LabVIEW.exe"
-PortNumberSpecifies 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
-LogFilePathSpecifies the path of the CLI for LabVIEW log file.
The default value is the path to the temporary location.
-LogFilePath "C:\temp\log.txt"
-LogToConsoleSpecifies whether to save the output to both the console and the log file.
The value for this argument must be one of the following:
  • true
  • false
The default value is true.
-LogToConsole false
-VerbositySpecifies the level of details to include in the log file.
The value for this argument must be one of the following:
  • Minimal
  • Default
  • Detailed
  • Diagnostic
The default value is Default.
-Verbosity Detailed

WAS THIS ARTICLE HELPFUL?

Not Helpful