2011

Table Of Contents
Swap and Insert Pull-Down Menus
Using the Customize User Interface (CUI) Editor, you can use workspaces to
control the swapping of pull-down menus. However, you can also swap one
pull-down menu programmatically for another (for example, when a user
loads an application that requires an additional menu).
Swap Pull-Down Menus
Because the program has cascading pull-down menus, there is little need to
swap menus. Also, swapping menus can detract from the consistency of the
user interface. However, using $ commands, you can swap pull-down menus
and submenus. An alternative to menu swapping involves relative (or global)
referencing. Using this method, you can insert the new menu in front of a
known menu and then remove the known menu.
For menu-swapping purposes, the pull-down menu areas are named P1 through
P16. You can change the title that appears in the menu bar by replacing that
line of the menu with a $Pn= command. You can use the special command
$Pn=* from within any command to force the menu currently assigned to area
POPn to pull down for greater flexibility in movement of the pointing device.
The following macro example replaces a menu at position P3 with the menu
named MyMenu in the customization group named MYMENU.
$P3=mymenu.new3
The same thing can be done with the AutoLISP menucmd function as follows:
(menucmd "P3=mymenu.new3")
You can use the $Pn=* special command from within any macro to force the
menu currently assigned to area POPn to be displayed.
NOTE The swapping of pull-down menus does not conform to the Microsoft
®
user interface guidelines and is not guaranteed to be available in future releases
of the program.
Insert and Remove Pull-Down Menus
Menu swapping is done by activating one menu directly from another menu.
Menu swapping is supported for the following interface elements:
B - Buttons
P - Pull-down menus
290 | Chapter 4 User Interface Customization