Hide Table of Contents
CreateCommand3 Method (IApplication)
Cmd[out]
Command

Creates the specified command for the command window with support for the specified context-sensitive (F1) help.

.NET Syntax

Visual Basic (Declaration) 
Function CreateCommand3( _
   const dsString& ApiUuid As System.String, _
   const dsString& CmdName As System.String, _
   long HelpID As System.Integer, _
   long ProductID As System.Integer, _
   dsCreateCommandError_e* Error As dsCreateCommandError_e _
) As Command
C# 
Command CreateCommand3( 
   System.string ApiUuid,
   System.string CmdName,
   System.int HelpID,
   System.int ProductID,
   out dsCreateCommandError_e Error
)
JavaScript 
CreateCommand3( 
   ApiUuid : String,
   CmdName : String,
   HelpID : Number,
   ProductID : Number
) : {
   Error : String,
   Cmd : dsCommand
}
COM native C++ 
HRESULT CreateCommand3( 
   BSTR ApiUuid,
   BSTR CmdName,
   LONG HelpID,
   LONG ProductID,
   dsCreateCommandError_e* Error,
   ICommand** Cmd
) 
C++ 
DSRESULT CreateCommand3( 
   const dsString& ApiUuid,
   const dsString& CmdName,
   long HelpID,
   long ProductID,
   dsCreateCommandError_e* Error,
   dsCommand** Cmd
) 

Parameters

ApiUuid

UUID of the add-in or non add-in application

CmdName
Unique name for the command
HelpID
ID of the context-sensitive help topic to open when F1 is pressed
ProductID
Product ID of the system help
Error[out]
Status of creating the command as defined in dsCreateCommandError_e
Cmd[out] or Return Value
Command

Example

See the IApplication::CreateCommand example.

Remarks

If CmdName already exists, then dsCreateCommand_e.dsCreateCommandError_CommandNameExisted is returned for Error.

Use the string specified for CmdName for IApplication::CreateUserCommand's UserCmdName parameter; e.g.; apiCmd.

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 2019 SP0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   CreateCommand3 Method (IApplication)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2021 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.