Express Yourself!

11 Feb, 2004 By: Bill Fane

Bill Fane looks at some of the AutoCAD Express Tools for managing layers.

It was a dark and stormy night. This was good, because it meant more snow was falling on Whistler. The bad news was Captain LearnCurve would have to work late getting this article finished so he could go skiing in the morning. He was spurred on by the thought of riding the Glacier Express high-speed quad chair, then climbing Spanky's Ladder to get into all that double-black-diamond fresh powder in Ruby Bowl.

Speaking of expresses, have you taken a close look at the Express Tools in AutoCAD?

That's one of the worst segues ever!

Always trying to set new records.

Anyway, once upon a time, a long time ago, way back in the last millennium, there were no authorization codes. To encourage you to register your software, Autodesk offered a bonus. The Bonus Tools were a series of AutoLISP and ADS programs that added extra functions to AutoCAD. Some were useful utilities, some were prototypes of regular functions that would be incorporated into later releases, and some were just plain fun.

Later, the Bonus Tools were included on the AutoCAD installation disks or CD-ROM. With AutoCAD 2000, they became known as the Express Tools. They currently include about 100 utility functions that can make your CAD life easier and/or provide additional functionality not available in AutoCAD out of the box.

The Express Tools were provided free for a limited time and are now available for purchase at the Autodesk Web site. The really good news is that with AutoCAD 2004 they are again included on the installation CD-ROM. The really bad news is that they are not available for LT because it does not support AutoLISP.

Let's take a look at a few of the tools to show you the sort of functionality that is available. Start by clicking on the Express item in the menu bar.

Hold it! My copy of AutoCAD doesn't have an Express menu pick!

That's because you haven't installed them yet.

But you told me they were part of AutoCAD 2004!

No, I said they were on the CD-ROM. You have to install them separately after you finish installing AutoCAD. Simply run Setup from the installation CD, then click on AutoCAD Express Tools in the lower left corner of the dialog box. The rest is pretty much automatic and self-explanatory.

Once the Express Tools load, click on Express in the menu bar. It displays the scroll menu in figure 1, which also shows the Express Tools toolbars.

Express Tools
Figure 1. Express Tools menu and toolbars.

The first thing to note is that the toolbars show only a small fraction of the available Express Tools. For the rest of this article, I'll focus on the menu simply because it gives more choices.

Express Tools
Figure 2. Express Tools Layers cascade menu.
Let's start by clicking on the Layers item, which causes the menu in figure 2 to cascade out.

Layer Manager could be an interesting item, except for one minor detail. Its basic function is to allow you to define named sets of layer state settings and then recall them. For example, you may have a complex architectural drawing with a great many layers. Once the named layer states are set up, you can easily flip between "show only the third-floor layers" and "show only the walls and the HVAC layers".

The only flaw in this tool is that its functionality is now incorporated into base AutoCAD's Layer command, but the two versions are not compatible. The tool exists only to support "grandfather" setups from earlier releases. If you want to take advantage of this functionality, check out my Learning Curve column of May 2003 and use the Layer command instead.

Let's Go For A Walk
The Laywalk tool is really cool, and particularly useful when dealing with a drawing that has more than one layer (seriously!).

Express Tools
Figure 3. LAYERWALK dialog box.
Open a suitable drawing. The sample drawing WILHOME.DWG is a good one. Its exact location depends on the particular release or vertical application (such as Mechanical Desktop) that you use, but it's somewhere near C:\Program Files\Autodesk\AutoCAD 2004\Sample.

When it opens, click on Express / Layers / Layer Walk. This brings up the dialog box in figure 3.

Okay, yours probably won't look exactly like figure 3. The first time around it just shows a small window with one layer name in it. No problem-simply grab the bottom edge of the dialog box with your mouse and stretch it out to show more layer names.

The first thing to note is the blue background. Click on one layer name within the list. It continues to have a blue background while the rest of the list takes on a white background. Watch in shock and awe as most of the drawing disappears!

Click on a different layer name. It takes on the blue background, and the previous one reverts to a white background. Not only that, drawing objects still visible from the previous operation disappear and new ones become visible.

A bit of experimenting reveals that Layerwalk is an instant freeze-and-thaw-layers function. As you click on a layer name, the selected layer thaws and all other layers freeze. You can thus "walk" through a drawing to see what is on each layer.

But Wait, There's More!
You can use the usual Windows multiobject selection modes. For example, you can pick a name, then hold down the Shift key while you pick another name. The two names and all names between the two are selected. Similarly, Ctrl-pick adds a single name to the selection or removes one that is already selected. In any case, the drawing responds instantly to your current selection.

Here's another cool feature. If you double-click on a layer name, an asterisk (*) appears to the left of its name, and it's locked On. It thus stays on even when its background is not blue. Double-clicking again removes the lock.

That's pretty cool, but I want to freeze a single layer. I can see an object that I want to freeze, but I don't know its layer and I don't feel like walking through the whole list looking for it.

No problem. Simply click on the Object Select button in the upper-left corner of the dialog box. The dialog box collapses, and you're invited to Select Objects. Pick one or more objects. When you press Enter, the dialog box returns and the layer names corresponding to the objects are selected. As usual, the selected layers are visible in the drawing, and everything else is frozen.

Nice, but the exact opposite of what I wanted.

By The Right, CLICK!

Express Tools
Figure 4. LayerWalk context menu.
No problem. Simply right-click anywhere in the layer name list. This brings up the context menu in figure 4.

The functions of the first seven selections are pretty obvious from their titles. For example, Hold Selection applies the asterisk beside each name in the selected group and locks them on, as though you had double-clicked on each one in turn. Select Unreferenced is grayed out in figure 4 because there are no unreferenced (that is, empty ) layers in this drawing.

What you want is Invert Selection. With it you can flip back and forth between showing all of the layers you selected vs. showing all layers except the ones you selected.

Save Layer State asks you to give a suitable name to the current selection of frozen and thawed layers. This named state is then compatible with the Layer Manager Express Tool, but unfortunately is not compatible with the Layer command's Layer Manager.

Inspect is another fun one. It pops up a simple dialog box that tells you how many layers exist in the drawing, how many of them are currently selected, and how many objects are on the selected layers.

Before looking at the last three items in the context menu, we need to go back to the main dialog box in figure 3.

Filtering Out The Lumps
Notice the small single window up near the top? This lets you enter a filter, which can include wild cards. For example, type AR*, then press Enter. The LayerWalk dialog box now lists, and automatically selects, only those layers whose names begin with the letters AR. The Filter check box also becomes active, so you can turn the filter on and off.

You can define more than one filter set, so you can easily flip between filters.

Filter definitions normally evaporate at the end of the current editing session, but the last context menu items let you save them so they are available in other sessions and in other drawings. You can also delete unwanted ones.

Note two final items in the main dialog box in figure 3. First, the button in the lower left corner lets you purge any unused layers.

Second, note the Restore on Exit check box at the bottom of the dialog box. By default it's On, so that when you exit from Laywalk all layer settings return to the state they had before you started. If you turn it off, your drawing retains the current layer states when you exit.

All in all, Laywalk is a valuable, useful tool. Be sure to come back next time when we look at more of the Express Tools.

And Now For Something Completely Different...
There is a delightful black-diamond run at Whistler called Robertson's. Unfortunately it can be hard to find because it's not posted at the top. To find it, ride the Harmony Express chair up, and then run back along Harmony Ridge. When your shirt-pocket GPS receiver indicates N 50.05888

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!