AutoCAD R14 menu customization technology

AutoCAD R14 menu customization technology

1 Menu file structure and menu format In order to protect the existing accumulation of users and developers, so that the product transition is relatively smooth, and can fully tap the potential of the latest Microsoft technology, AutoCAD R14 not only retains the original menu structure, but also New extensions have been made so that users and developers can fully use the graphical user interface (GUI) customization technology of the Windows 95 / NT platform to conveniently customize the R14 user interface. Therefore, the AutoCAD R14 menu not only includes the original various device menus, pull-down menus, cursor menus, and on-screen menus, but also adds and enhances the customization function of the toolbar button menu.
1.1 Menu file structure According to different areas of AutoCAD R14 interactive interface, the menu file is divided into different sections, each section contains many menu items. Users can describe different sections and menu items according to their own needs, not necessarily describe all the sections and items as AutoCAD menu files. In order to realize the function of loading and unloading partial menus in R14, the menu file should also include the menu group name. Therefore, the format of the menu file is as follows:
*** MENUGROUP menu file group name, if the user does not write, then the menu file full path name is the group name;
*** AUXn system pointing device button menu (as defined by mouse button);
*** POPn drop-down menu or cursor menu;
â–³ *** TOOLBARS toolbar button menu;
*** IMAGE image menu;
*** SCREENn screen menu;
*** TABLETn digitizer board menu;
â–³ *** HELPSTRINGS Help information of the status line of the pull-down menu, cursor menu or toolbar button;
â–³ *** ACCELERATORS accelerator key definition; // comment line.
Among them, the menu section with "*" is the newly added content of R14.
1.2 Menu Item Format The menu item format of R14 is:
name_tag label menu_macro
The name tag label menu macro format is uniform for all menu sections, except that there is no name_tag in the image menu item; and the meaning of label for different menu sections is also different. Among them, name_tag is the unique identifier of each menu item in the menu file, its role is (1) to link the drop-down menu and toolbar buttons to the corresponding status line help; (2) to connect the drop-down menu to its corresponding accelerator key Get up; (3) Used to control the status of menu items (such as available or unavailable);
The label is the relevant information displayed to the user in []. For example, for TOOLBARS, the content in [] defines the name, status (floating, hidden, or visible, etc.), location, and icon of the toolbar;
menu_macro is the action to be performed by the menu item or button, which can be AutoCAD commands, AutoLISP programs, ADS / ARX programs, etc. E.g:
*** TOOLBARS
** TB_ABD
** ABD
// Define the toolbar.
ID_ABD_0 [_Toolbar ("ABD Wall", _FloaTIng, _Show, 400, 50, 1)]
// Define toolbar buttons.
ID_ABD_1 [_Button ("Draw Wall", "ICON.bmp", "ICON0041.bmp")] ^ C ^ CABD _WALL:
*** HELPSTRINGS
ID_ABD_0 [Wall drawing and editing.]
ID_ABD_1 [Draw a double-line wall directly.]:
If the above fragment is included in the menu source file, after compiling and calling, a toolbar named "ABD Wall" will appear, which contains a button named "Draw Wall". When the user moves the cursor to the toolbar, the help information of "Wall drawing and editing." Appears in the status line of the window; when the user moves the cursor to the button, "Draw a double-line wall directly." The help information appears in the status line of the window, and there is a "Draw Wall" prompt at the cursor arrow.
2 The composition of the menu file To meet the new requirements of the user for menu customization, the original menu must be expanded, which is not only reflected in the change in the menu structure, but also in the change in the composition of the menu file. Before R14, the original menu file of AutoCAD was * .MNU, and its compiled file was * .MNX; in R14, * .MNX no longer exists. Instead, it is replaced by several other types of files. The menu file of AutoCAD R14 is composed as follows:
* .MNU AutoCAD R14 menu template file (text format);
* .MNC AutoCAD R14 compiled menu file (binary format);
* .MNS Menu source file (text format) generated by AutoCAD R14 compilation;
*. Resource files (binary format) used in the MNR AutoCAD R14 menu;
* .AutoLISP program file (text format) loaded by the MNL menu of the same name;
3 User menu file preparation process (1) Write the menu template file * .MNU and the called AutoLISP program file * .MNL in the format required by AutoCAD in the form of a text file. If there is a toolbar menu, the corresponding Icon files (small icons 16 * 15 points, large icons 24 * 22 points);
(2) Use the MENU command to compile the already written menu template file (the file type in the dialog box for selecting a file requires the user to switch * .MNU), AutoCAD R14 will automatically generate * .MNC, * .MNS and * .MNR files ;
(3) Use interactive way to add and edit toolbar menu, AutoCAD R14 will automatically update * .MNS files. If users want to keep the newly added toolbar menu to avoid losing when compiling * .MNU again, they must manually * .MNS After copying the relevant content in * .MNU, you can use the MENU command to compile * .MNU again.
4 Retrieval order of R14 menu call When the user calls the menu interactively or programmatically, AutoCAD R14 calls the menu in the following file retrieval order:

In addition to calling the menu with the MENU command, AutoCAD R14 can also use the MENULOAD command to bring the menus in other menu files into the current graphics editing environment, and replace some or all of the currently used menus. In the program, you can use the (MENUCMD) function and menu identification to control the state of the menu.
5 Toolbar buttons Most of the contents of the AutoCAD R14 menu are almost the same as the original menu, and will not be repeated here. Here mainly introduces the customization method of the toolbar.
5.1 Toolbar Button Introduction Toolbar button is a very convenient interactive control method in the Windows system platform, especially on the Windows95 / NT 4.0 platform, the use of the toolbar is more flexible and convenient, and can be quickly customized by the user , So that it is popular among Windows users. AutoCAD R14 also makes full use of the toolbar buttons, and allows multiple ways to customize the toolbar. Its characteristics are: (1) convenient customization; (2) can display a variety of prompts and help information
5.2 Customization of toolbar buttons
(1) Direct file method Users can write the toolbar button directly into the menu template file * .MNU or the original menu file * .MNS according to the menu file format requirements of R14. When recompiling and calling the menu, the toolbar button will press The user's request is displayed; (2) When there is no toolbar button in the interactive method menu, use the TOOLBAR command to start the toolbar management program to create and modify the toolbar button;
When there are some toolbar buttons in the menu, just move the mouse to any toolbar button and press the right mouse button to start the toolbar management program, and then modify and edit the toolbar button properties.
(3) The step of creating a new toolbar button starts the toolbar button management program;
Create a new toolbar and enter the relevant attributes of the toolbar;

Add a button in the new toolbar; press the "right mouse button" on the new button to enter the relevant properties of the button;

The icon of the edit button (ICON).

6 Conclusion AutoCAD R14 provides users and developers with a more convenient menu customization mechanism. Especially the customization technology of the toolbar button menu is flexible to use and convenient to customize, and can be widely used in application software.

This Automation curtain is specially designed for automation industry. SDKELI LSC2 light curtain is designed for automation field, with small size, compact structure and strong anti-interference ability, and the product meets IEC 61496-2 standards. The Automatic Light Curtain is with reliable quality and very competitive price. It has been used in many factories and has replaced curtains from Sick, Omron, Banner, Keyence, etc.  

Automation Light Curtain

Automatic Light Curtain,Laser Light Curtain,Automation Light Beam Sensor,Automatic Infrared Beam Sensor,Infrared Beam Curttain Sensor,Infrared Beam Sensor

Jining KeLi Photoelectronic Industrial Co.,Ltd , https://www.sdkelien.com

Posted on