Hide Table of Contents
CreateCommand4 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 CreateCommand4( _
   const dsString& ApiUuid As System.String, _
   const dsString& GlobalCmdName As System.String, _
   const dsString& LocalCmdName As System.String, _
   long HelpID As System.Integer, _
   long ProductID As System.Integer, _
   dsCreateCommandError_e* Error As dsCreateCommandError_e _
) As Command
C# 
Command CreateCommand4( 
   System.string ApiUuid,
   System.string GlobalCmdName,
   System.string LocalCmdName,
   System.int HelpID,
   System.int ProductID,
   out dsCreateCommandError_e Error
)
JavaScript 
CreateCommand4( 
   ApiUuid : String,
   GlobalCmdName : String,
   LocalCmdName : String,
   HelpID : Number,
   ProductID : Number
) : {
   Error : String,
   Cmd : dsCommand
}
COM native C++ 
HRESULT CreateCommand4( 
   BSTR ApiUuid,
   BSTR GlobalCmdName,
   BSTR LocalCmdName,
   LONG HelpID,
   LONG ProductID,
   dsCreateCommandError_e* Error,
   ICommand** Cmd
) 
C++ 
DSRESULT CreateCommand4( 
   const dsString& ApiUuid,
   const dsString& GlobalCmdName,
   const dsString& LocalCmdName,
   long HelpID,
   long ProductID,
   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 localized command, which is displayed to the user and which can be used as input
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

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 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:   CreateCommand4 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) 2019 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.