Jump to content

CoreOperation

From LabVIEW Wiki

CoreOperation is the base LabVIEW Class of all operations of NI LabVIEW Command Line Interface.

Methods

GetHelp

The GetHelp method is called when the -Help option is specified for an operation:

 LabVIEWCLI -OperationName <name> -Help

Each operation must override the GetHelp method to provide custom help text. The method has a single return value for the help text.

DataType Description
Help text. This is displayed on the command line when using the -Help flag.

RunOperation

The RunOperation method executes when an operation is called:

 LabVIEWCLI -OperationName <name> [<arg>...]

Each operation must override the RunOperation method to provide custom behavior. The method receives the list of arguments and returns the return code and output text to display on the command line. A return code of zero indicates success.

DataType Description
List of arguments and values in the order they are specified on the command line. For example, "-arg1 99" is provided as ["-arg2", "99"].
Return code. 0 indicates success.
Output text to display on the command line.

Read Logger

The Read Logger method provides access to the Logger instance of the CoreOperation class. Operations can use this method to access the logger to put additional output on the command line.

See also

External links