|
|
|
Shortcut menus are displayed at or near the location of your cursor when you right-click on the pointing device. The shortcut menu and the options it provides depend on the location of the cursor and other conditions, such as whether an object is selected or a command is in progress. You can also use scripts to display shortcut menus.
Context-sensitive shortcut menus display menu options that are relative to the current command or the selected object when you right-click.
Shortcut menus are referenced by their aliases and are used in specific situations. In the Customize User Interface (CUI) Editor, the alias names must follow the proper naming conventions. For example, the shortcut menu named “Default Menu” displays the following information in the Aliases section of the Properties pane:
CMDEFAULT is one of the reserved aliases that the program looks for in specific situations. In this case, the shortcut menu assigned the alias CMDEFAULT is displayed if no objects are selected and no command is in progress when you right-click over the drawing window.
Aliases for context-sensitive shortcut menus must be numbered between POP500 and POP999, with the exception of the Object Snap menu which uses an alias of POP0. The following aliases are reserved for use by the program:
The CMEDIT and CMCOMMAND shortcut menus can be made context-sensitive. In addition to the content of the CMEDIT menu, the appropriate object menu (if it exists) is inserted into this menu when one or more of a specific object type are selected. Object menus use either of the following naming conventions: OBJECT_objectname
If a single object is selected, the OBJECT_objectname menu is used, and if more than one of the same object type is selected, the OBJECTS_objectname menu is used. If no OBJECT_objectname is available, the program uses the OBJECTS_objectname menu (if it exists).
The object name used for the alias is the drawing interchange format (DXF™) name of the object in all cases except for inserted objects. The following table shows the object names that are specific to inserted objects (blocks, dynamic blocks, and xrefs).
For example, to support an object-specific shortcut menu for one or more selected block references, you would create or modify a shortcut menu and change its properties to those in the following table. The important property to change is Aliases, which would need to modified to include the alias OBJECT_BLOCKREF.
Like the CMEDIT menu, the CMCOMMAND menu can contain context-sensitive information. Any menu named COMMAND_commandname is appended to the CMCOMMAND menu. The text of commandname can be any valid AutoCAD command, including custom-defined or third-party commands.
In many cases, you can enter a hyphen before a command to suppress the display of a dialog box and display prompts for the command instead. To create a context-sensitive menu for a command that displays prompts instead of a dialog box (such as -INSERT), you need to name the menu COMMAND_-INSERT.
-
To create a shortcut menu (Procedure)
-
To create a command shortcut menu (Procedure)
-
To create an object shortcut menu (Procedure)