When the user right clicks a selection set, the menu that (optionally) pops up is the Edit Shortcut Menu.
Here is how BricsCAD builds this menu:
- If SHORTCUTMENU = 0, no menu appears (see Settings > Program Options > User Preferences > Shortcut menus).
- Otherwise, the shortcut menu, which has alias "CM_EDIT", is shown. (e.g. if default.cui is the main CUI, see Customize > Menus tab > BricsCAD > Context menus > Edit. The 'Alias' field reads "CMEDIT")
- If there is only one object in the selection set, a menu with alias "OBJECT_objecttype" is looked up, and its items are inserted after the first separator. 'objecttype' is the DXF object type of the entity, e.g. OBJECT_LINE for lines. You can fetch an entity's objecttype by pasting '(cdr (assoc 0(entget(car (entsel)))))' on the command line, and then picking the entity.
- If there are more than one objects in the selection set, all of the same object type, a menu with alias "OBJECTS_objecttype" is looked up, and its items are inserted after the first separator.
BricsCAD searches for a context menu with a certain alias in the following order:
- first the main CUI file (main menu group, with default.cui this is BRICSCAD) is searched; if a menu is found there, the search stops and no menu in partial CUI files will be used.
- If there is no such menu in the main group, the partial CUI files are searched. If more than one partial CUI file contains such a menu, the menu from the CUI file that was first loaded is used, the other is ignored. The order in which CUI files are loaded, is the order in which they were loaded the first time, this is reflected by the order in which they appear in the main CUI file, and this can be changed by unloading and reloading a partial CUI file, or by changing the order in the CUI file with an external editor while BricsCAD is closed.