CreateCommand2 Method (IApplication) Send Feedback
See Also 
Cmd[out]
Command
ApiUuid
UUID of the add-in or non add-in application
GlobalCmdName
Unique name for the global command, which is not displayed to the user but which can be used as input
LocalCmdName
Unique name for the local command, which is displayed to the user and which can be used as input
Error[out]
Status of creating the command as defined in dsCreateCommandError_e
Creates a command for the command window.

Syntax

Visual Basic 
Function CreateCommand2( _
   ByVal ApiUuid As System.String, _
   ByVal GlobalCmdName As System.String, _
   ByVal LocalCmdName As System.String, _
   ByRef Error As dsCreateCommandError_e _
) As Command
C# 
Command CreateCommand2( 
   System.string ApiUuid,
   System.string GlobalCmdName,
   System.string LocalCmdName,
   out dsCreateCommandError_e Error
)
JavaScript 
CreateCommand2( 
   ApiUuid : String,
   GlobalCmdName : String,
   LocalCmdName : String
) : {
   Error : String,
   Cmd : dsCommand
}
COM native C++ 
HRESULT CreateCommand2( 
   BSTR ApiUuid,
   BSTR GlobalCmdName,
   BSTR LocalCmdName,
   dsCreateCommandError_e* Error,
   ICommand** Cmd
) 
C++ 
DSRESULT CreateCommand2( 
   const dsString& ApiUuid,
   const dsString& GlobalCmdName,
   const dsString& LocalCmdName,
   dsCreateCommandError_e* Error,
   dsCommand** Cmd
) 

Parameters

ApiUuid
UUID of the add-in or non add-in application
GlobalCmdName
Unique name for the global command, which is not displayed to the user but which can be used as input
LocalCmdName
Unique name for the local command, which is displayed to the user and which can be used as input
Error[out]
Status of creating the command as defined in dsCreateCommandError_e
Cmd[out] or Return Value
Command

Example

 

Remarks

If either GlobalCmdName or LocalCmdName already exists, then dsCreateCommand_e.dsCreateCommandError_CommandNameExisted is returned for Error.

To see a list of existing commands:

  1. Right-click a toolbar in the user interface.
  2. Select Customize Interface.
  3. Click Commands on the left side of the dialog.
  4. Use the scroll bar to see the list of existing commands.
  5. To quickly locate a command that you've added:
    1. Type the name of the command in Find.
    2. Click the name of the command in the Name column.
    3. Examine the information at the bottom of the dialog.
 

See Also

Availability

DraftSight V1R5.0