Jump to content

NI LabVIEW Command Line Interface

From LabVIEW Wiki

NI LabVIEW Command Line Interface (Command Line Interface for LabVIEW, LabVIEW CLI) is a LabVIEW add-on that exposes operations that can be called directly from the command line. It was first introduced in LabVIEW 2014 and is included with LabVIEW Full and higher tiers.

The NI LabVIEW Command Line Interface (CLI) is a software add-on for LabVIEW. You can use it to automate the build process of LabVIEW applications and run the VIs and custom operations you create in LabVIEW.[ni 1]

LabVIEW CLI is installed in the version-independent Shared directory of LabVIEW and is therefore available to all installed versions of LabVIEW starting with LabVIEW 2014. This also means that all operations are written in LabVIEW 2014 to ensure compatibility with all supported versions of LabVIEW.

Synopsis

 LabVIEWCLI -OperationName <name> [<arg>...]
            [-AdditionalOperationDirectory <path>]
            [-LabVIEWPath <path>]
            [-PortNumber <number>]
            [-LogFilePath <path>]
            [-LogToConsole (true|false)]
            [-Verbosity (Minimal|Default|Detailed|Diagnostic)]
            [-Help]

Options

-OperationName <name> [<arg>...]
Runs the specified operation. If the operation has additional arguments, they must be specified after the operation name.
-AdditionalOperationDirectory <path>
Specifies the directory where additional operations are located.
-LabVIEWPath <path>
Specifies the path to the LabVIEW executable to use. This argument is required on macOS and Linux but optional on Windows. On Windows, it defaults to the most recently started version of LabVIEW.
-PortNumber <number>
Specifies the port number to use for the LabVIEW CLI server. The default port number is 3363.
-LogFilePath <path>
Specifies the path to the log file. If not specified, the log file is created in the temporary directory.
-LogToConsole (true|false)
Specifies whether to log messages to the console. The default value is true.
-Verbosity (Minimal|Default|Detailed|Diagnostic)
Specifies the verbosity level of the log messages. Available options are: Minimal, Default, Detailed, and Diagnostic. The default value is Default.
-Help
Display help text for the specified operation.

Operations

Operations are individual tasks that LabVIEW CLI can execute. Each operation has a unique name and can be called with additional arguments from the command line.

Predefined operations

LabVIEW CLI includes a set of predefined operations that can be called from the command line:

Additionally, custom operations can be created to extend the functionality of LabVIEW CLI.

Custom operations

The functionality of LabVIEW CLI can be extended with custom operations. Custom operations are created by inheriting from CoreOperation and overriding GetHelp and RunOperation.

History

See also

External links

References