AutoCAD Services & Support

The Tool Palettes Extension - Extending the AutoCAD Interface

In a recent article, I explained AutoCAD® 2004 software’s new tool palettes in detail. Now, Autodesk has come out with an extension that greatly expands the capabilities of the tool palettes and makes them easier to use as well. If you are unfamiliar with tool palettes, I suggest that you read my earlier article first.

As usual, extensions are available only to Autodesk® Subscription members but will be rolled into the next major release.

As originally designed, tool palettes stored content, such as blocks and hatches. In the original AutoCAD 2004 release you could create tools (the individual objects on a tool palette) by dragging them from the AutoCAD® DesignCenter™ feature. The new extension turns tool palettes into a source for additional drawing objects, such as xrefs, images, gradients, and menu items. And now you can create these tools by dragging directly from your drawing, a toolbar button, or list of AutoCAD commands. You can even drag files from Microsoft® Windows® Explorer.

This expansion of the original tool palettes constitutes a major new interface. The last time such an interface change occurred was the move from the side-screen menu to the pull-down menus. (I know some of you are still using the screen menu and like it.) In addition, several features make organizing and customizing your tools easier.

This extension also adds new symbols to the Multiline Text Editor and enhanced support for Japanese characters.

Adding Content Tools

In addition to hatch patterns and blocks available in AutoCAD 2004 tool palettes, you can now add xrefs, graphics image files, and gradients to tool palettes. For example, you can create a tool that fills a closed area with a hatch or gradient, or a tool that inserts an image or xref. Although you can still drag objects from the DesignCenter, the new method is simpler and more direct—just drag from a drawing or Windows Explorer.

When you drag content to the tool palette, the software automatically creates a tool that inserts the content using the same properties (such as color, scale, and rotation) as the original. Here are the steps:

  1. To display the tool palette, choose Tool Palettes on the Standard toolbar (or press Ctrl+3).
  2. Right-click any blank area of the tool palette and choose New Tool Palette.
  3. Enter a name.
  4. Select a hatch, block, xref, graphic (raster image), or gradient for insertion onto the tool palette.
  5. Drag the item onto the tool palette. When you click, you should see an arrow cursor with a small rectangle below it, as shown here.

A tool appears on the tool palette. In Figure 1 you see one of the gradients that I dragged onto the tool palette.

Figure 1: This drawing contains gradients, an xref, a raster image, and hatches—perfect for creating tools on a tool palette. The tool palette shows one gradient tool.

The tool palette automatically assigns a name, but you may want to change it to make it more meaningful. Right-click the tool, choose Rename, and enter a new name.

Figure 2: This tool palette contains two gradients, two hatches, a raster image, and an x-ref.

You can create a tool palette of your commonly used content items so that you can easily access these tools for all your drawings. (See Figure 2.)

Using and Configuring Your Content Tools

When you create a tool by dragging from a drawing, you are creating a tool by example. The parameters of the tool match those of the item you dragged onto the tool palette. To see how this works, right-click a tool that you dragged and choose Properties to open the Tool Properties dialog box. (See Figure 3.)

Figure 3: The properties for the tool you drag onto the tool palette match the properties of the object in your drawing.

You can change the properties in the Tool Properties dialog box if you want. For example, you can change the angle of the hatch shown in Figure 3. You may need to scroll down to access additional properties. Just make the changes and click OK.

The tools are self-aware, so to speak. A gradient knows that it is a gradient, and an image knows that it is an image, which means that they are easy to use. Drag a gradient or hatch into an enclosed area and it automatically fills the area. Drag an xref onto a drawing and you get a prompt, at the command line, for the insertion point.

Adding Flexibility to Your Tools

Because the tools you create by dragging content from a drawing take their properties from that object, they may contain an inherent scale. For example, hatches, blocks, and xrefs have a certain size. However, sometimes you need to adjust a scale, based on your overall dimension scale (which you set on the Fit tab in the Modify Dimension Style dialog box and which is stored in the DIMSCALE system variable) or your plot scale (which you set in the Plot dialog box). For example, if you have a block or xref of text that you often add as a note at the bottom of a drawing, you need the text size to adjust to your dimension or plot scale.

To set the scale of a hatch, block, or xref tool, right-click the tool and choose Properties. Click the Auxiliary Scale item. Then click the down arrow that displays on the right and choose either Dimscale or Plot Scale. Click OK. From now on, the block or xref comes into your drawing at the scale you have set in your drawing.

If you create “unit” blocks that you scale as you insert, you may want a more customized approach to scaling certain blocks and xrefs. Perhaps you insert windows at various sizes. When you insert blocks and xrefs, the Specify insertion point or [Scale/X/Y/Z/Rotate/PScale/PX/PY/PZ/PRotate]: prompt appears at the command line. You can use the Scale option to change the scale. Of course, you can use the other options as well to change the rotation or scale of individual X, Y, or Z dimensions.

Note: The options starting with P, such as PScale, enable you to preset scale and rotation so that you can see how the block or xref looks at the specified scale or rotation. The drag image adjusts to your setting. However, when you specify an insertion point, the prompt for scale and rotation reappears so that you can change them if you want. The preset options are helpful when you are not sure of the proper scale or rotation. You can use them anytime you insert a block or xref, not just when using the tool palette.

Adding Command Tools

In my previous article on the tool palettes feature in AutoCAD 2004, I mentioned an undocumented use for tool palettes—creating commands. No longer are they undocumented. In fact, the tool palettes command feature has been significantly expanded and is now much easier to use.

Why would you use tool palettes instead of toolbars, menus, and the command line for executing commands? Here are some of my ideas; you may be able to think of others:

  • With the AutoHide feature, you can collapse the tool palette to a vertical sliver so that it doesn’t take up drawing space. You can still easily access the tool palettes just by moving the cursor over the palette.
  • You can organize commands any way you want. (For more about organizing, see the discussion of groups later in this article.) You can do this with toolbars as well, but they take up more room. You can also customize your menus, but they are slower to use.
  • The View Options (right-click on the tool palette and choose View Options) give you many ways to display the tools. You can vary the size of the icons, do away with the text, and so on. As a result, you can fit many commands on a tool palette without losing readability.

You can add commands in a variety of ways: from objects in a drawing, buttons on a toolbar, or commands in the Customize dialog box. You choose the method depending on the amount of customization you want and how you want to organize your commands.

Objects from a Drawing

You can drag drawing objects, such as circles, text, and so forth, onto a tool palette. AutoCAD 2004 software creates a command that draws that object with the same properties as the original object. For example, if you need to enter text on the Annotation layer using the Annotation text style, you can create a tool with those properties. Just select existing text, click until you get the arrow cursor, and then drag it onto a tool palette. The tool is now called simply Mtext. Right-click, choose Rename, and enter Annotation or something else meaningful.

To use your tool, just drag it onto the drawing area. Regardless of the current layer or text style, you now have the MTEXT command available, already set to the layer and style you want. (See Figure 4.) You just size the Mtext bounding box and enter the text you want. Inserting the text doesn’t change the current layer, so that after you insert text you can continue to work on your current layer.

Figure 4: The Annotation tool creates Mtext on the proper layer and with the right text style.

Suppose you have two dimension styles that go on two different layers. Previously, you had to change the layer and then change the dimension style before you could start the dimension command you wanted to use. Now, you just drag the dimension you want from the tool palette, and the layer and dimension style automatically come along for the ride. In this way, you can place your dimensions faster and with fewer mistakes.

But that’s not all. When you create your dimension tool, the tool palette recognizes the dimension (perhaps a linear dimension) as one of a group of commands, in this case, all the dimension commands. (See Figure 5.) They all create dimensions on the same layer and using the same dimension style as the original dimension you used to create the tool. Only certain types of commands create flyouts, namely, dimensions and common drawing geometry objects (such as lines and circles).

Figure 5: Creating one dimension tool automatically creates a flyout of all the dimension tools.

Buttons on a Toolbar

To transfer your toolbars to tool palettes, you can drag buttons from a toolbar onto a tool palette. These can be standard toolbar buttons or custom buttons that you have created, including those with AutoLISP® or other programming code. To transfer toolbar buttons to a tool palette, follow these steps:

  1. From the Tools menu, choose Customize>Toolbars. The Customize dialog box displays.
  2. If the toolbar you want to use isn’t displayed, select its check box.
  3. 3Drag the buttons you want, one by one, onto the tool palette. (The Customize dialog box doesn’t seem to have any function here, but you can’t drag buttons off a toolbar if it’s not open.)

Figure 6 shows an example of a tool palette with the object snap commands and a few items from a custom toolbar.

Figure 6: From toolbar button to tool palette.

Tip: I wanted to create a “spacer” between the object snap commands and the other commands. I did this by dragging the User Defined button onto the tool palette. To find the User Defined button, in the Customize dialog box, click the Commands tab and scroll to the bottom of the commands. Select User Defined. Then choose User Defined Button on the right side of the dialog box. Then rename the tool to --------------------, that is, lots of hyphens.

Commands from the Customize Dialog Box

As I did for my spacer (see the preceding tip), you can drag commands from the Commands tab of the Customize dialog box. Select commands from the categories, or scroll to the bottom and select All Commands to display an alphabetical list of all commands. Then drag any command onto a tool palette.

Organizing Your Tool Palettes

You may have one set of tool palettes for architectural work and another for mechanical work. For whatever reason, you may want to display one set of tool palettes at one time and another set at another time. For this purpose, you can organize tool palettes into groups. Follow these steps to create groups:

  1. From the Tools menu, choose Customize>Tool Palettes.
  2. In the Palette Groups area of the dialog box, right-click and choose New Group.
  3. Enter the name of the group.
  4. From the Tool Palettes list on the left side of the dialog box, drag a tool palette under the group name on the right.
  5. Continue to create groups and drag palettes into the groups until you are finished. (See Figure 7.)
  6. Click Close to close the Customize dialog box.
Figure 7: Organize your palettes into groups in the Customize dialog box.

To display the various groups, right-click the title bar of the tool palette and choose the group you want. Using groups helps avoid clicking through too many tool palettes. After all, the point is instant access. However, you can always display all the palettes by right-clicking and choosing All Palettes.

Tip: You can’t put a tool palette in more than one group, but you can duplicate a tool palette by creating a new one and then copying and pasting tools to the new palette. To copy a tool, right-click it and choose Copy. Then click the new palette, right-click and choose Paste. You can then put the new tool palette in a different group. You might do this if you have a generic tool palette that you want in more than one group.

Inserting Symbols

Now for something totally different. The extension has also added several often-used symbols to the Mtext Editor, making it easier to add these symbols to text. To add the symbols, start the MTEXT command. Then right-click in the text area, choose Symbol, and then select the symbol you want. (See Figure 8.) The symbol is part of the text, so you can resize it and format it. For example, you can make it italic or bold. The symbols are available only in certain fonts but match other TrueType fonts well.

Figure 8: You now have many more symbols to choose from.

Figure 9 shows the actual symbols that you can insert.

Figure 9: The new symbols added to the Mtext Editor.

Finally, there are new Japanese fonts, extfont2.shx and @extfont2.shx (vertical), as well as ASCII fonts for use with Japanese fonts—extslim2.shx and exthalf2.shx. These last fonts are 2/3 and 1/2 the width of Japanese fonts, respectively.

Easier Workflow

The new Tool Palettes Extension offers lots of new opportunities for making your workspace easier to use. Quicker access to commands, blocks, xrefs, images, hatches, and gradients enables you to focus on your drawing instead of on the mechanics of AutoCAD software. Because the tool palettes are so easy to work with, you should have fun setting them up and reorganizing them to suit your work style.