Loading CUI Files With AutoLISP Daily Autocad
Loading CUI Files With AutoLISP Daily Autocad
3/04/2010 Muharrem Koyiit in AutoLISP , Customization , Download labels. [AutoCAD 2006 and higher versions. Level: Advanced] Hello dailyautocad readers, 0 yorum
In todays article, I would like to explain .CUI file extension that has come with AutoCAD 2006. With new features added into AutoCAD menus, complexity of .MNU, .MNC, .MNR and .MNS file extensions, which we were using before, has become obsolete. All of the necessary data is stored in a database based on a XML format and in a menu that has .CUI file extension. In previous versions of AutoCAD, we were able to edit customized menus in simple text editors like Notepad. But, from now on, you have to work with an interface that has been customized for user. When you enter _CUI into command line, you will get the view shown in Fig. 1. You can get the same view when you use _TOOLBAR command, thus it works same as _CUI command. Any change that is made on menus is saved as version data into database. By this way, workspaces and toolbars can easily be transferred to other AutoCAD versions without losses.
Fig. 1 User interface customization tool : CUI (Custom User Interface) Thanks to CUI, it has become much more easier to create our own toolbars and commands by using Drag & Drop method. Even if you are not experienced enough, you can easily create your own menus without any mistakes. Your old menus (.MNU) will be automatically converted into .CUI file. When you enter_MENULOAD into command line, then you can load your own menu by using the dialog box as seen in Fig. 2. After clicking browse button, choose the location of your menu. You can select file extensions from CUI, MNU or MNS.
Fig. 2 MENULOAD command You can add your personal menus into acad.cui menu, which is the basic menu. In AutoCAD terminology, main menu is called base menu and additions is called partial menu. If your main menu acad.cui is not seen on screen, then you can restore it back to its original by using _MENU command. In order for you to create your own menus, Autodesk has included an empty menu called custom.cui. You can copy this file with another name and make any changes you want.
You can copy this file with another name and make any changes you want. LISP commands that belong to menu are written into a file with .MNL file extension. By this way, LISP programs will be loaded automatically. Note that, .MNL file must have the same name with the name of menu. Icons that you have prepared for menu are stored in the same directory with .BMP file extension. If you want to perform a professional way of working, then keeping all of the icons that belong to menu under the same directory is always the best method. You have to prepare a file with .DLL file extension that has the same name with menu. If there is demand, I can also explain this method. It is explained how to load menus with AutoLISP program in the links given below. Have ease everyone.