Learning Curve: Tooling Right Along -- Tool Palettes, Part 2

5 Sep, 2006 By: Bill Fane

A few simple tweaks on your tool palettes can help you comply with your CAD standards.

It was a beautiful, warm sunny day. Conditions were perfect; the bay was glassy calm, and no other boats were around. Suddenly a shout rang out: "Hit it!" Once again Captain LearnCurve was carving a perfect set of turns on his HO Mach 1 competition water ski. You definitely need the right tools to do the job properly.

Actually, this was the bad news, because his next Learning Curve deadline was rapidly approaching, and he really should have been writing instead of water skiing. Normally he would be desperate for a topic, but luckily he was smart enough to pick a topic last month that would take more than one article to cover properly, so he had a bit of a head start. There was time for one more run, then on to the writing.

Speaking of tools, the previous Learning Curve introduced tool palettes, which first appeared in AutoCAD 2004. You learned how to start the ToolPalettes command, how to make the Tool Palettes window auto-hide as well as the basic steps for using tool palettes. For example, you saw how to easily apply a hatch pattern to an area simply by clicking on the appropriate tool icon and then clicking in the desired area.

You also began to see the true power of tool palettes when you saw how a tool palette icon can also have properties defined that affect how the tool is applied. The example I used last time was hatch patterns, wherein two different tool icons let you almost instantly apply the same hatch pattern at two different rotation angles, plus a third tool that applied the same hatch pattern but with a different color. You can simply right-click on any tool to change its properties.

Layer One On Me
You can apply a specific layer to a tool, so that AutoCAD automatically places the selected object on the correct layer. The really cunning part here is that the target layer doesn't have to exist in the current drawing. For example, you can create a Hatch layer in the current drawing, complete with an appropriate color. You can then edit a hatch tool to specify this layer.

Now comes the magic part. If you then use this tool to apply hatching in a different drawing, one that does not have the desired layer pre-defined within it, then AutoCAD automatically creates the layer, complete with the correct color and other appropriate properties.

AutoCAD 2005 added a significant new functionality to tool palettes, called "tools by example." Let's see how they work.

Create a new layer called Hidden. Give it a color of green, the hidden line type and a line weight of 0.005". Draw a circle on this layer.

Now, click on the circle so it highlights, pause, then click on it again and drag it onto a tool palette. Remember, don't do this too quickly or you'll launch the Properties editor instead. Like magic, the Circle command icon appears on your tool palette.

Not unexpectedly, when you click on this new icon, the Circle command starts and it places the circle on the Hidden layer regardless of the current layer setting. Once again, it creates the layer to your specifications if it doesn't already exist.

On The Fly
Ah, but check out the fine print. If you take a close look at the Circle icon on the tool palette, you'll notice a small right arrow triangle next to the Circle icon. Click on it, and a flyout reveals icons for the eight fundamental draw commands! What's more, if you click on one of them, such as the Spline command, then the spline you draw automatically appears on the Hidden layer! The last icon you use becomes the current one shown on the palette. Conversely, it doesn't matter which of the draw commands you use initially to create the Draw flyout tool.

Editing the properties of any icon in the flyout applies the changes to all icons.

This functionality can go a long way towards ensuring compliance with CAD standards. Simply create a group of icons for drawing on the Object layer, the Hidden layer, the Center layer, the Construction layer and so on. Just click on the icon from the correct group, and everything lands where it should.

The point is that tools by example also work for dimensioning and text. In these cases, the tools have the exact same properties as the example. Not only does this include properties such as layers, but the tools have the same style as the prototype. You can thus quickly and easily create a set of tools that replicate various text and dimension styles.

On the other hand, commands such as Boundary, Polygon and Donut actually just create polylines; so any tool palette icons you create from them simply create the Pline icon and the standard Draw flyout.

What's In a Name?
Now here comes one of the crunchy bits. Okay, so you have used the Circle command to create tool icon groups for your various layers, but they all have the same title in the tool palette. How can you tell which is which?

It appears to be very easy. Simply right-click on an icon, then pick Rename from the context menu. You can now rename the Circle icon to be the Circle-Hidden icon.

Oops, all the icons in this flyout are now called Circle-Hidden even if they create lines, arcs, splines and so on. You can choose one of two workarounds for this problem. The first is to simply rename each icon flyout to Object, Hidden, Center and so on and then rely on recognizing each icon for what it does. The Tooltips that appear when you hover the cursor over an icon help.

The second solution is to upgrade to AutoCAD 2006 or later. In these releases, you can right-click in an open area of the tool palette, then select Text from the context menu. You can thus add a suitable text item such as Object, Hidden, Center and so on right above its appropriate flyout group. You can also add separator lines between sets of tool icons.

If things don't land exactly where you want them to, don't panic. You can always drag-and-drop tools up and down the palette to change their sequence.

But Wait, There's More!
Be sure to come back next time when I explore how to add block insertions and AutoLISP functions to tool palettes as well as how to share your custom palettes with other users.

And Now For Something Completely Different
Most people clean a gas barbeque the wrong way. In fact, I have even seen owner's manuals for new units that advocate the wrong way.

Wrong: When you have finished using it, simply turn it off and walk away. Next time you use it, turn it on High with the lid closed for 10 minutes or so until all the leftover grease and accumulated crud burns off.

Right: When you have finished using it, turn it off and clean the grill racks using a suitable cleaning brush immediately after removing the food, while the unit is still warm. Next time you use it, you only need to warm it up for a minute or two to be ready to cook.

The wrong way has several problems, including the fact that it uses more fuel, it tends to damage the porcelain finish on the grill racks, and it leaves a dry ash on the grills that tends to make food stick to them next time.

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!