Swapping Button and Auxiliary Menus

The Buttons and Aux sections use a new syntax for menu swapping: the submenus used in previous releases no longer exist. Instead, what were submenus are now full menu sections. Each of these menus requires a ***section in which section is an unbroken string made up of the proper keyword to indicate which type of menu it is (such as ***BUTTONS, ***AUX) followed by any additional text you wish.

Note: The use of text characters following the keyword is not guaranteed to work in future releases of AutoCAD LT. To ensure compatibility, you should use only index numbers after the keyword. So, even though labels such as ***AUXTEST and ***BUTTONS1-2 are currently valid, labels such as ***AUX10 or ***BUTTONS15 are preferred for long-term compatibility.

The **label syntax indicates aliases to a given section. The labels must come between the ***section line and the first menu item line for that section. The alias label string can be any string; it does not need to contain any keyword. You can have as many aliases as you like for each section; however, it is recommended that you keep them to a minimum to save system resources. The alias labels, as well as the section labels, can be used to identify the menu for swapping purposes. For example, in the following menu any of the labels BUTTONS1, alias1, or alias2 can be used as a designator for the following menu.

MENUGROUP=test

***BUTTONS1
**alias1
**alias2
;
^C

Therefore, the following function calls all swap in the same menu.

(menucmd "B1=test.buttons1")
(menucmd "B1=test.alias1")
(menucmd "B1=test.alias2")

If you use the ** syntax to name subsequent menus, the ** is changed to *** when AutoCAD LT builds the MNS file. For example, when the MNU file in the following example is loaded, it is converted to the MNS file as shown.

MNU file

***AUX1
**alias1
circle

**sub2
line

**sub3
arc

MNS file

***AUX1
***alias1
circle

***sub2
line

***sub3
arc

The menu parser assumes that typographical errors were made and that *** was really intended. The labels sub2 and sub3 can still be used as labels for swapping purposes.

You may have as many uniquely named Buttons and Aux sections as you like in a given menu file. However, remember that each menu takes up memory and system resources. Excessive menus in a single menu file might require more resources than are available on some systems, therefore, this could lead to unpredictable behavior.