Management

AutoCAD 2006 for CAD Managers, Part 2

9 Jun, 2005 By: Robert Green


2605CadMan

In the last issue of the CAD Manager's Newsletter, I began my coverage of AutoCAD 2006 with an overview of some new features I think CAD managers should know about. I also promised that I would begin examining the CUI (Customized User Interface) command and how you can use it to your advantage.

If you haven't had a chance to look at that issue, you might wish to do so now so you have proper context for this issue.

Customized User Interface — Menu Mechanics
One of the first things many CAD managers do when they customize AutoCAD is create customized pull-down and toolbar menus. In the past, the source for these menus was an MNU file. AutoCAD loaded the MNU file to generate further menu files with types MNS (menu source), MNR (menu resource) and MNC (compiled menu).

An additional AutoLISP file in MNL format could be included with the custom menu as well to facilitate loading AutoLISP routines that were required only by that menu environment.

In the new CUI environment, the lowly old MNU file has been replaced by a newer, slicker CUI file that is loaded using either the new CUI command or the old familiar Menu command that AutoCAD has supported for as long as I can remember. This is not to say that your old MNU code is dead, just that it has been superseded by something better. What makes the CUI file different from the old menu file is that it contains the following information, which is not stored in menu files:

Dockable window functions. Sheet Set Manager, Markup Set Manager, Tool Palettes and Design Center, to name the more prominent functions, may now be present with respect to wake-up state (on/off) as well as their transparency and float/dock states. These types of status items were always controlled globally via AutoCAD and did not change when a new menu was loaded.

LISP files. These may now be associated to the CUI file. The AutoLISP file doesn't actually become part of the CUI file, but rather is maintained like a pointer to an Xref. I'll examine the AutoLISP integration more later in this article.

Partial CUI files. Loading these files is very similar to loading additional MNS/MNU files in older releases of AutoCAD and using Menuload to juggle which submenus are on and off. Notable additions are now the ability to partially load related files such as AutoLISP code. Partial CUI files are now used to load Express Tools.

You can see graphical evidence of all these new capabilities in the CUI command dialog box (figure 1).

Figure 1. Custom User Interface dialog box is new to AutoCAD 2006.

Loading Menus
Your old MNU files can be read using a slight change to the reliable Menu command. Use the Menu command to load an MNU file, which is now called a Legacy Menu Template (figure 2).


Figure 2. You can still use the Menu command to load old MNU files in AutoCAD 2006.

Once the MNU file is loaded, the new CUI command reflects the new menu structure in the current workspace you have selected (figure 3).


Figure 3. Loaded MNU files appear in the new Custom User Interface in your current workspace.

It's important to note that loading menu files is no longer just a matter of pointing to a menu file, but rather resetting an entire subsection of the workspace and CUI file the system uses.

In the interest of full disclosure, I have to admit that I'm still much more comfortable working with the good old MNU file in a text editor than I am rifling through a hundred or more right-click property screens. I will admit, however, that the ease with which you can now transfer and copy menu subsections between CUI files makes the migration of old menu sections and new ones much more pleasant for less-experienced programmers and those who've never used the old approach to edit files.

Customized User Interface — AutoLISP Mechanics
Probably the second thing many CAD managers do when they customize AutoCAD is use custom AutoLISP files to load in custom functions. In the past, we've had to keep track of which files we need or rely on the Appload function to maintain a list of the files we need to load. Although both these approaches worked, they offered no easy way to know which files were supposed to be loaded.

The CUI file maintains a pointer to any AutoLISP files you wish to load with the overall menu environment (figure 4). The AutoLISP file is maintained in the CUI file so that any time this CUI file is loaded, AutoCAD attempts to find the AutoLISP files using normal pathing parameters.


Figure 4. Custom CUI files maintain pointers to all AutoLISP files that must load with them.

I can't stress enough that even with this new feature, the CAD manager is still responsible for keeping the AutoLISP files in a path that can be located, and that AutoCAD's new CUI mechanism will not prevent your users from tampering with or even deleting your files. All the old rules of file security still apply.

Give It a Try
The best way to really get a good feel for the CUI interface is to jump in and give it a try. I recommend you start simple by building a new CUI file that includes a custom MNU file and some AutoLISP files you already use. You can then test to make sure the menus migrated as you expected, and that your LISP code loads properly.

My experience so far has been that an hour of poking around and using the Help documentation has made this learning process relatively painless. I hope that the starting point I've provided will give you a rapid start on working with CUI files.

Wrapping Up
In the next issue of the CAD Manager's Newsletter, I'll continue coverage of AutoCAD 2006's CUI functions and set the stage for the conclusion of the series, which will examine the new dynamic block capability. Until next time.


About the Author: Robert Green

Robert Green

AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter



Poll
Which file format do you use most often for CAD drawing/model exchange?
Native format
PDF
3D PDF
DWF
STEP or IGES
JT
IFC
Other
Submit Vote