Menu files are divided into sections that relate to specific areas of the AutoCAD LT interface. Depending on its functionality, each menu area can be defined by one or more sections. Each section contains menu items, which provide instructions for the appearance and action related to the menu selection.
A menu file does not need to contain entries for every menu section. You need only those that pertain to your application. It is recommended that you divide menus into several smaller menu files that can be loaded and unloaded on demand (with MENULOAD). Not only does this give you better control of your system resources, but it also makes development and maintenance easier because you can work with smaller pieces as needed.
Menu file sections are identified by section labels that use the format ***section_name. Section labels and their associated menu areas are listed in the following table.
Section label | Menu area |
***MENUGROUP | Menu file group name |
***BUTTONSn | Pointing-device button menu |
***AUXn | System pointing device menu |
***POPn | Pull-down/cursor menu areas |
***TOOLBARS | Toolbar definitions |
***IMAGE | Image tile menu area |
***SCREEN | Screen menu area |
***TABLETn | Tablet menu area |
***HELPSTRINGS | Text that is displayed in the status bar when a pull-down or cursor menu item is highlighted or when the cursor is over a toolbar button |
***ACCELERATORS | Shortcut (or accelerator) key definitions |
Each section contains menu items that define the appearance and functionality of menu selections.
You can include comments in menu files for use as copyright notices, documentation, or notes. Any line that begins with two slashes (//) is ignored by the menu compiler, as shown in this example:
//This line is a comment
The ***MENUGROUP= label defines the contents of a menu file to be members of a particular group. The purpose of this group name is to distinguish its items from other items when using partial menus. This label must precede all menu sections that use the name tag mechanism. It defines the menu group name for these sections. A Menugroup definition is a string of up to 32 alphanumeric characters (spaces and punctuation marks are not allowed). The Menugroup section contains no menu items.
Because each menu has its own menu group label, multiple partial menus can use the same name tag. A name tag, therefore, must be unique only within the menu file in which it was defined. This also enables applications that load partial menu files to access each other's items.
Menu group names combined with Pop menu names or aliases provide:
The general syntax of menu items is consistent across all menu sections that contain menu items. Each menu item can consist of a name tag, a label, and a menu macro (except the Image section, which does not permit name tags). A menu item normally resides on one line of the file and uses the following format.
name_tag label menu_macro
The following sample menu code from a Pop (pull-down) menu illustrates a simple menu item:
The first item ID_Quit is the name tag and the label [Exit] displays Exit in the menu. When a user chooses this menu item, the menu macro ^C^C_quit is issued.
A name tag is a string consisting of alphanumeric and underscore (_) characters that uniquely identifies an item within a menu file. It directly precedes the menu item label. Name tags provide the following functionality:
Name tags are not allowed in Buttons, Aux, and Image sections. They are allowed in Screen and Tablet sections but serve no purpose.
The format and use of menu item labels differs for each menu section. The label is contained within square brackets ([]) and defines what is displayed or presented to the user. Menu sections that have no interface for displaying information do not require labels (such as the Buttons, Aux, and Tablet sections); however, they can be used for internal notes. The following table lists menu item labels in different menu sections and the use of those labels.
Menu section | Use of label |
Buttonsn, Auxn, and Popn | Defines the content and formatting of pull-down and cursor menu selections |
Toolbars | Defines the toolbar name, status (floating or docked, and hidden or visible), and position; also, defines each button and its properties |
Image | Defines the text and image displayed in the image tile menus |
Screen | Defines the text that is displayed in the screen menus |
Helpstrings | Defines the status line help related to Pop and Toolbar menu items |
Accelerators | Associates keyboard action with menu macros |