In a survey of AutoCAD users, Autodesk discovered that one of the most frequently used features in AutoCAD was the Layer command. As a result, the layer controls in AutoCAD have been greatly improved. Still, there is room for some improvement.The Express Layer tools include some shortcuts to controlling layer settings as well as one major layer enhancement called the Layer Manager.
Saving and Recalling Layer Settings
The Layer Manager lets you save layer settings. This can be crucial when you are editing a file that serves multiple uses, such as a floor plan and reflected ceiling plan. You can, for example, turn layers on and off to setup the drawing for a reflected ceiling Plan view, and then save the layer settings. Later, when you need to modify the ceiling information, you can recall the layer setting to view the ceiling data. The following steps show you how the Layer Manager works.
- In AutoCAD, open the 14a-unit.dwg file. Open the Layer Properties Manager dialog box and turn on all the layers except the Notes and FIr-pat layers. Your drawing should look similar to the top image of Figure 19.1
- Click the Layer Manager tool in the Express Layer Tools toolbar.
The Layer Manager dialog box appears.
- Click the Save button. The Layer State Name dialog box appears.
- Enter blank floor plan, and then click OK. The Layer Manager dialog box reappears. Notice that the name you entered for the layer state appears in the list box.
- Click the Close button.
- Now open the Layer Properties Manager dialog box again and turn on the Fir-pat and Notes layers and turn off the Ceiling layer. Your drawing will 100. like the bottom image of Figure 19.1.
- Click the Layer Manager tool again.
- Click BLANK FLOOR PLAN in the list, and then click Restore.
- Click Close. Your drawing reverts to the previous vie~ with the Notes and FIr-pat layers turned off and the Ceiling layer on.
The layer states are saved with the file so you can retrieve them at a later date. As you can see from the Layer Manager dialog box, you have a few other options. Here is a listing of those options and what they do:
Edit Opens the Layer Properties Manager dialog box to let you edit the settings for a layer state. Highlight the layer state in the list; ana then choose Edit.
Rename Lets you rename an existing layer setting.
Delete Deletes a layer state from the list.
Import Imports a set of layer states that have been exported using the Export option of this dialog box.
Export Saves a set of layer states as a file. By default, the file is given the name of the current file with the .lay filename extension. You can import the layer state file into other files.
Options Lets you control which layer options are saved as part of the layer state. When you click Options, you see the Layer Manager: Restore Options dialog box. This dialog box consists of a set of check boxes. You check the options you want to have saved by the Layer Manager. By default, all of the layer options are saved. The options offered in the Layer Manager: Restore Options dialog box are: ON/OFF status, Thaw/Freeze status, Thaw/Freeze in Current Viewport status, Lock/Unlocked status, Color status, Linetype status, Lineweight status, Plot status, and Plot Style status.
Changing the Layer Assignment of Objects
In addition to the Layer Manager, the Express Layer toolbar offers two tools that change the layer assignments of objects. The Match Objects Layer tool is similar to the Match Properties tool, but is streamlined to just operate on layer assignments. After choosing this tool, you first select the object or objects you wish to change, and then you select an object whose layer you wish to match.
The Change to Current Layer tool changes an object’s layer assignment to the current layer. This tool has long existed as an AutoLISP utility and you’ll find that you’ll get a lot of use from it.
Controlling Layer Settings through Objects
The remaining set of Express Layer tools lets you make layer settings by selecting objects in the drawing. The tools in this set are simple to use: Just click the tool, and then select an object. These tools are so helpful, you may want to consider docking them permanently in your AutoCAD window. The following list describes what each tool does.
Isolate Objects Layer Turns off all the layers except for the layer of the selected object.
Freeze Object Layer Freezes the layer of the selected objects.
Turn Objects Layer Off Turns off the layer of the selected object.
Lock Objects Layer Locks the layer of the selected object. A locked layer is one that is visible but cannot be edited.
Unlock Object Layer Unlocks the layer of the selected object.
Deleting a Layer While Preserving Its Contents
Every now and then, you will inherit an AutoCAD file from some other office or individual and you’ll want to convert its layering system to one more suited to the way you work. This usually involves renaming and deleting layers. The Layer Merge Express tool is a great aid in this effort.
Layer Merge can be found by choosing Express >- Layers >- Layer Merge. It works by first moving all the objects from one layer to another existing layer. You can either select objects to indicate the layer you want, or you can type in the layer names. Once the objects are moved, Layer Merge deletes the empty layer. Another related tool is Layer Delete (Express > Layers > Layer Delete). This tool will completely delete a layer and its contents.
Tools for Editing Text
It seems that you can never have enough text-editing features. Even in the realm of word processors, there are innumerable tools for setting fonts, paragraphs, tabs, . and tables. Some programs even check your grammar. While you’re not trying to write the great American novel in AutoCAD, You are interested in getting your text in the right location, at the right size, with some degree of style. This often means using a mixture of text and graphics editing tools. Here are some additional tools that will help ease your way through some otherwise difficult editing tasks.
Masking Text Backgrounds
One problem AutoCAD users frequently face is how to get text to read clearly when it is placed over a hatch pattern or other graphic. The Hatch command will hatch around existing text leaving a clear space behind it. But what about those situations where you must add text after a hatch pattern has been created? Or what about those instances where you need to mask behind text that is placed over non-hatch objects, such as dimension leaders or raster images?
The Text Mask tool addresses this problem by masking the area behind text with a special masking object called a Wipeout. Try the following exercise on the 14a-unit.dwg file to see firsthand how it works.
- In the Unit file, make sure the Fir-pat and Notes layers are turned on.
- Adjust your view so you see the kitchen area as it appears in the top image of Figure 19.2. Notice that the Kitchen label is obscured by the floor’s hatch pattern.
- Choose the Text Mask tool from the Express Text Tools toolbar.
You’ll see the following message:
Current set~ings: Offset factor – 0.3500, Mask type – Wipeout
Select text objects to mask or [Masktype/Offset):
- Here you can enter the amount of space you want around the text as a percentage of the text height or you can select a different type of object for the mask.
- Select the Kitchen text and click the Living Room text. When you’re done selecting text, press button You’ll see the message
Masking text with a Wipeout
1 text items have been masked with a Wipeout.
The text appears on a clear background, as shown in the bottom image of Figure 19.2.
Text Mask creates an object called a Wipeout that masks other objects behind the text. Wipeout is not a standard AutoCAD object; it is a new object created through AutoCAD’s programming interface.
If you prefer to use a 3D Face or Solid to hide the background of text, you can do so by entering M.J at the prompt in step 3. You see the following prompt asking you to select a Mask type:
Specify entity type to use for mask [Wipeout/3dface/Solid] <wipeout>:
Enter the mask type at this prompt, and you’ll return to the previous prompt.
If you want more room around the text, you can enter O.J at the prompt in step 3. You can then enter a value for the margin around the text.
The Wipeout object has its own little quirks that you will want to know about. To get a bit more familiar with Wipeout objects, try the following exercise.
- Click the Kitchen text. Notice that both the text and the Wipeout object are selected.
- Click Move on the Modify toolbar.
- Move the text and Wipeout object to the right about 12 inches or 30cm for metric users. The text seems to disappear.
- Type Re to issue a Regen. The text appears once again.
The text and Wipeout objects are linked so that if you select the text, you auto- matically select the Wipeout object. Also, the display order of the two objects gets mixed up’ when you move’ them so you need to issue a Regen command to restore the text’s visibility. You can also edit or erase the Wipeout object. There is a description on how to edit Wipeout objects in the Express Standard Tools section later in this chapter.
If you want to delete the Wipeout background, use the Express > Text > Unmask Text option. This option prompts you to select an object. You then select the masked text and the Wipeout background disappears.
Next, you’ll look at ways to globally change text objects.
Finding and Replacing Text
While the Find and Replace tool isn’t really an Express tool, it is an example of a former Express tool that has been moved into the main part of the program. This is one tool that users had been asking for a long time.
Find and Replace works like any other find and replace tool in a word-processing program. There are a few options that work specifically with AutoCAD. Here’s how it works.
- Click the Find and Replace tool on the Standard toolbar.
The Find and Replace dialog box appears.
- Enter the text-you want to locate in the Find ‘Iext String input box.
- Enter the replacement text in the Replace With input box.
- Click Find. When AutoCAD finds the word, it appears in the Context window, along with any other text next to the word.
- If you have any doubts, click the Zoom to button to display the text in the AutoCAD drawing area. .
- Finally, when you’ve made certain that this is the text you want to change,click Replace.
If you want to replace all of the occurrences of a word in the drawing, click Replace All. You can also limit your find and replace operation to a specific area of your drawing by clicking the Select Object button in the upper-right comer of the Find and Replace dialog box.
When you click the Select Objects button, the Find and Replace dialog box disappears temporarily to allow you to select a set of objects or a region of your drawing. Find and Replace will then limit its search to those objects or the region you select.
You can further control the types of objects that Find and Replace looks for by clicking the Options button. This opens the Find and Replace Options dialog box.
With this dialog box, you can refine your search by limiting it to blocks, dimension text, standard text, or hyperlink text. You can also determine whether to match case or find whole words only.
Adding Linked Text Documents
One of the more frustrating and time-consuming aspects to drafting is editing lengthy notes. General notes and specifications change frequently in the life of a project so editing notes can be a large part of what you do in AutoCAD. Frequently, notes arc written by someone else, perhaps a specification writer, who doesn’t work directly with the drawings.
You can improve the efficiency of note editing by using OLE to cut and paste notes into your drawing (see Chapter 14 for more on OLE). That way, you or the specification writer can edit the note and it will be automatically updated in drawings that contain pasted copies of the note. There are some drawbacks to OLE-linked text documents. However, the biggest problem is that you have little control over the text size and font.
To make note editing easier, AutoCAD supplies the Remote Text object. This is a special object that is linked to an external text document. Like an OLE object, a Remote Text object will automatically update its contents whenever its source document changes. To use Remote Text objects, take the following steps.
- Choose Express > Text > Remote Text or type RtexU at the command prompt.
- At the Enter an option [Style/Height/Rotation/File/Diesel] <File>: prompt, press button The Select Text File dialog box appears. This is a typical file dialog box that lets you locate and select a file for import.
- Select a file and click Open.
- At the Specify start point of RText: prompt, position the text in the drawing .
- At the Enter an option [Style/Height/Rotation/Edtit]: prompt enter H, then enter the height for the text.
As you can see from the prompt in step 5, you can specify the text style, height, and rotation for the imported text. You also have the option to edit the text from within AutoCAD.
Since the Remote Text object is linked .to the original document you selected in step 3, whenever that original document is edited, the Remote Text object in your drawing will be updated automatically, in a way similar to Xrefs.
Automatically Update Drawing Information Labels
Another way to use Remote Text is to use it to add labels of the drawing’s general information, such as the name of the file, the date it was last edited, and the person who did the editing. This information is usually placed in the comer of the drawing for reference so that a print of a drawing can be easily associated with a drawing file.
Remote Text can be used to keep track of this information. Even if the name of the file or its location on the hard drive changes, Remote Text will automatically update labels displaying this information. Here’s an example of how to set up Remote Text to do this.
- Choose Express > Text > Remote Text or type Rtext at the command prompt.
- At the Enter an option [Style/Height/Rotation/File/Diesel] <File>:prompt, enter D. to select the Diesel option. The Edit Rtext dialog box appears.
- Enter the following text: Drawing name and location: $(getvar, “dwg-prefix”)$( getvar, “dwgname”).
- Click OK. The text string appears as a rectangle in the drawing next to your cursor.
- Click a location for the text, which is usually placed in the lower-left comer of a drawing title block. The text displays the drawing location and name.
- At the Enter an opti on [Style/Height/Rotation/Edit] : prompt, type R, then enter 90 to rotate the text 90 degrees..
This example uses the Diesel option of the Remote Text tool. Diesel is one of many macro programming languages AutoCAD supports. The text S(getvar, dwgprefi x” )S(getvar, “dwgname’) is the diesel code that extra ts the current drawing location and name from the file. This code is translated into the actual directory listing and filename of the current drawing. This is how Remote Text reads the Dwgprefix and Dwgname system variables of the file. If the file is movedto another location or if it is renamed, Remote Text reads the dwgprefix and dwgname system variables and updates the label containing this code. You’ll learn more about the Diesel option in Chapter 20.
Other Express Text Tools
You’ve learned about several of the main text-editing tools in the Express Text tools toolbar and Express pull-down menu. There are several more text-editing tools that you may find useful. By now, you should feel comfortable in exploring these tools on your own. The following is a brief description to get you started:
Text Fit Lets you visually stretch or compress text to fit within a given width .
ArcAlignedText Creates text that follows the curve of an arc. If the arc is stretched or changed, the text follows the arc’s shape. This is one of the more interesting bonus text-editing tools offering a wide range of settings presented in a neat little dialog box.
Explode Text Converts the individual characters in a text object into
polylines. Beware! This tool can take some time while it works.
Express Block Tools
Every now and then, you run into a situation where you want to use objects within a block to trim or extend to, or perhaps you may want to copy a part of a block to another part of your drawing. Here are six tools that will let you do these things. They’re fairly simple to use, so the following descriptions should be enough to get you started.
Copy Nested Entities Lets you copy single objects within a block. You are only allowed to.select objects individually-one click at a time. The copied objects will be placed on the current layer .
Trim to Block Entities Lets you trim to objects in a block. It works just like the standard Trim command with the exception that you must select the objects- to trim to individually.
Extend to Block Entities Lets you extend to objects in a block. It also works like its standard counterpart with the exception that you must select the objects you wish to extend to individually.
List Xref/Block Entities Displays basic information about an Xref or block. Global Attribute Edit On the Express Block Tools toolbar simplifies the global editing of attribute text.
Explode Attributes to Text On the Express Block Tools toolbar explodes blocks containing attributes so that the attribute values are converted into plain single-line text.