ProcessUserCommandLineArguments Event

TestStand 2017 Help

Edition Date: November 2017

Part Number: 370052W-01

»View Product Info

Download Help (Windows Only)
NI TestStand 2014 Help
NI TestStand 2014 SP1 Help
TestStand 2016 Help
TestStand 2016 SP1 Help
TestStand 2017 Help

Syntax

ControlName_ProcessUserCommandLineArguments ( processCommand, arguments, currentArgument, errorProcessing, errorMessage)

Applies To

ApplicationMgr

Purpose

Use this event to validate and process command-line arguments you define.

Remarks

The Application Manager control generates this event while validating and processing command-line arguments. When the Application Manager control validates the command line, the Application Manager control generates this event for command-line arguments that it does not recognize. For these events, you must validate the unrecognized command-line arguments. In addition, when the Application Manager control processes the command line, the Application Manager control generates this event again for command-line arguments that it does not recognize. For these events, you must perform the action that the arguments require. Use the processCommand parameter of this event to determine whether you must perform the action that the arguments requires.

Parameters

processCommand As Boolean

[In] The Application Manager control passes False to this parameter when the control is only validating and not actually processing the command line. When this parameter is False, handle this event the same as when this parameter is True, without performing the action the command-line specifies.

arguments As Strings

[In] Specifies the command-line arguments passed to the application.

currentArgument As Long

[In/Out] Specifies the index into arguments of the command-line argument the Application Manager control does not recognize. Increment this parameter for every argument you process. The Application Manager control continues processing the command-line arguments at this parameter when this event returns.

errorProcessing As ProcessCommandLineErrors

[In/Out] The Application Manager control initializes this parameter to ProcessCommandLineError_None. Set this parameter to ProcessCommandLineError_UnrecognizedArgumentError when you do not recognize the command-line argument. Set this parameter to ProcessCommandLineError_CustomError when you encounter any other error processing the command line. The Application Manager control stops processing the command line and generates the ReportError event when an error occurs while processing the command line.

errorMessage As String

[In/Out] When you set the errorProcessing parameter to ProcessCommandLineError_CustomError, set this parameter to a custom error message.


See Also

ApplicationMgr.AddCommandLineArgumentsHelp

ApplicationMgr.ProcessCommandLine

ApplicationMgr.ReportError

WAS THIS ARTICLE HELPFUL?

Not Helpful