Create Cimatron E Command DLL.
The following example demonstrates how to implement ICreateCommand methods.
The ICreateCommand methods:
Set the ICON that will be shown in the Command button.
Example: Set ICreateCommand_GetBitmap = LoadPicture (“c:\temp\xxx.ico)
Set the Category Name
Example: ICreateCommand_GetCategoryName = "Category Name"
Set the Command Name
Example: ICreateCommand_GetCommandName = "Command Name"
Set the location of the command in the menus.
It can be under an existing menu or you can create a new menu.
To create your command as SUB menu you need to separate the Path string and Sub menu string with <CR>.
Example: ICreateCommand_GetMenuPath = "New Menu Path" + Chr(10) + "Sub Menu"
This will write the String in the prompt area (Status bar at the bottom of the Cimatron E application)
Example: ICreateCommand_GetPrompt = "Get Prompt"
This string will be written in the Title of the Toolbar window.
Example: ICreateCommand_GetToolbarName = "Tool Bar Name"
ToolTip string to be shown when the cursor is on the command button
Example: ICreateCommand_GetTooltip = "Tool Tip"
In this function you can decide in which document type you want to see this command.
Example:
In this example I will see the command only in a PART document.
If iType = cmPart Then
ICreateCommand_IsBelongToDoc = True
Else
ICreateCommand_IsBelongToDoc = False
End If
This function Enables/Disables the command in the Pull Down Menus.
Example: ICreateCommand_ShowInMenu = True
This function Enables/Disables the command in the Tool Bar.
Example: ICreateCommand_ShowInToolbar = True