cadalyst
AutoCAD

Circles and Lines: Taking the Pain Out of Customizing AutoCAD Menus

13 Oct, 2005 By: Lynn Allen Cadalyst

If you are new to customizing AutoCAD, CUI is for you.


Customization has changed in AutoCAD 2006. You no longer have to know the cryptic code of the ACAD.MNS file. You no longer need to figure out the difference between the MNU, MNS, MNR, MNL and MNX file (yikes!). Now it's as easy as drag and drop -- very similar to that which you've experienced with the friendly AutoCAD toolbars.

Those of us who have been customizing our menus for quite some time were skeptical at first. We (sadly) know the difference between all those scary file types. But now everyone has a chance to participate in the power of customizing -- and isn't that much better? Let's share the wealth a little!

The new CUI (Customization User Interface) has received some bad press, primarily because it's different. Those of you who know how to program menus the old way aren't forced to change -- you can still create your menus and then transfer them into the CUI. The new ACAD.CUI file is XML based, as opposed to the ASCII text files of the past. XML gurus technically can edit the XML file directly, but it's REALLY not recommended. This article will primarily focus on users who are new to the customizing process and who want to gain a little more control over their AutoCAD environment.

Jump In!
The CUI is a one-stop shop for customizing. Here you can customize your toolbars, your pull-down menus, your right-click shortcut menus and your keyboard shortcuts (accelerators). You can even customize your tablet menus, image tile menus and the good old screen menu (listed under Legacy in the dialog box). The one thing you won't use the CUI for is the tool palette -- that's still done dynamically directly on the palette.

To get started, simply execute the CUI command. Key it in or right-click on any toolbar and select Customize from the menu. In general, the types of menus are listed in the upper left corner of the CUI, the AutoCAD commands are listed in the lower left corner, and the actual customizing will occur on the right side (figure 1).

figure
Figure 1. The CUI dialog box.

Let's add another pull-down menu of our favorite commands to the existing AutoCAD menu. Select Menus from the CUI to display a list of the current pull-down menus. Right-click on any of the menus, and select New to create a new pull-down. Enter "Favorites" as the title. This will place our menu at the end of the list. Drag the new menu between Tools and Draw (figure 2). Now you're ready to drag and drop your favorite commands into your new menu.

figure
Figure 2. Creating a new pull-down menu in the CUI.

figure
Figure 3. A sample customized menu of favorite commands.
Simply select your commands one by one from the list in the lower left corner. I've added Trim, Copy, Move, Offset and Insert for my list (figure 3). Select the command and then drag and drop them to the Favorites menu. You can key in the first letter of the command you want, and the CUI will jump to the commands that begin with that letter. After adding them to your menu, feel free to move them around to get them in the desired order. Select OK to save and exit the dialog box, and then take a look at your masterpiece!

Location, Location, Location
So is your new menu in the right location? Probably not. Even though the CUI displays it in the right location in the list, your Favorites menu is probably the very last menu -- what's up with that? If you go back into the CUI and select your new menu, you'll see that the new menu has an alias of POP12 (or something similar). Each of the pull-down menus has a number assigned to it. The File menu is POP1, Edit is POP2, etc. This is the order the pull-down menus will display. So even though you drag your menu to a different location, it's still hard-coded to move to the end. You can manually change the various numbers to get it in the proper location or just leave it at the end.

You are currently editing the AutoCAD menu (ACAD.CUI). If you decide to upgrade to the next release of AutoCAD, you'll find that the corresponding ACAD.CUI will override this one, and it will be very difficult for you to migrate your precious customizing. For this reason, you might find it better to create a partial menu. It's easy to insert a partial menu into this and subsequent releases of AutoCAD. The Express Menu is an example of a partial menu -- it's simply added into the AutoCAD menu environment. Let's look at the procedure for that (only slightly different and just as easy!).

Partial Menus
From the upper left corner of the CUI, select Partial CUI Files. You'll find a partial menu called Custom that Autodesk has earmarked for you to use for your own customization purposes. Select Custom, and then follow very similar steps as before. Select Menu/ (right-click) / New/ Menu. Name this one Favorites2 and add the commands just as before (figure 4).

figure
Figure 4. Creating a partial menu in the CUI.

So Favorites2 should now be the last of the pull-down menus. We used to be able to specifically control where the partial menus appeared within the pull-downs with the Menuload command, but if that functionality still exists in AutoCAD 2006, I couldn't find it. It's not the end of the world, but it would be nice if we could control where the partial menus landed. You can still control them through AutoLISP for you LISPers out there.

Just a quick look at the other tools in the customization section of the CUI (figure 5): you can load a partial CUI file from disk by selecting the first tool. The second tool lets you save all of your current customization files (can't make out what the difference is between this and Apply).

figure
Figure 5. Tools in the customization section of the CUI.

figure
Figure 6. The Display Filters dialog box controls what appears in the CUI dialog box.
The last tool displays the dialog box displayed in figure 6. The Display Filters dialog box allows you to control just exactly what displays in the CUI dialog box (making it easier for you to work on the different customization types). If you're only working on menu customization, you might choose to turn off toolbars, mouse buttons, legacy, etc. This is very similar to the layer filter concept.

For those of you who are transferring your old menus into AutoCAD 2006, be sure to install Service Pack 1. This will ensure your menus are imported into AutoCAD in the best possible shape.

This is just an introductory look at the new CUI. Next month we'll dive deeper and take a look at some of the other sections.

Happy customizing and happy AutoCAD-ing!


More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!


For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!