Modifying a Block


You can modify a block in two ways. One way is to completely redefine the block. In earlier versions of AutoCAD, this was the only way to make changes to a block. A second way to modify blocks is to use the Reference Edit tool. The Reference Edit tool lets you quickly modify a block in its existing location. Reference Edit offers more flexibility when editing blocks and another type of object called an Xref, but it also has a few limitations.

In this chapter, you'll learn how to redefine a block by making changes to the door symbol. Later, in Chapter 6, you'll see how the Reference Edit tool enables you to quickly modify a block that will then affect other copies of the block throughout a drawing.

Tip  

Double-clicking most objects displays the Properties palette. Double-clicking a block opens the Reference Edit dialog box, which offers another way of editing blocks. The Reference Edit dialog box is not available in AutoCAD LT. You'll learn more about the Reference Edit dialog box in Chapter 6.

Unblocking and Redefining a Block

One way to modify a block is to break it down into its components , edit them, and then turn them back into a block. This is called redefining a block. If you redefine a block that has been inserted in a drawing, each occurrence of that block within the current file changes to reflect the new block definition. You can use this block redefinition feature to make rapid changes to a design.

Tip  

If the Regenauto setting is turned off, you have to issue a Regen command to see changes made to redefined blocks. See Chapter 6 for more on Regenauto.

To separate a block into its components, use the Explode command:

  1. Choose Explode from the Modify toolbar. You can also type X to start the Explode command.

  2. Click the door and press to confirm your selection.

    Tip  

    You can simultaneously insert and explode a block by clicking the Explode check box in the lower-left corner of the Insert dialog box.

Now you can edit the individual objects that make up the door, if you so desire . In this case, you want to change only the door's insertion point because you have already made it a more convenient size . So now you'll turn the door back into a block, this time using the door's lower-left corner for its insertion base point:

  1. In the Draw toolbar, select Make Block or type B . You can also choose Draw   Block   Make.

  2. In the Block Definition dialog box, select the name Door from the Name drop-down list.

  3. Click the Pick Point button and pick the lower-left corner of the door.

  4. Click the Select Objects button and select the components of the door. Press when you've finished making your selection.

  5. Select the Convert To Block option in the Objects button group to automatically convert the selected objects in the drawing into a block.

  6. Select Inches from the Drag-And-Drop Units drop-down list, and then enter Standard door in the Description list box.

  7. Now click OK. You'll see a warning message that reads "Door is already defined. Do you want to redefine it?"You don't want to redefine an existing block accidentally . In this case, you know you want to redefine the door, so click the Yes button to proceed.

    Tip  

    The Select Object and Select Point buttons appear in other dialog boxes. Make note of their appearance, and remember that when you select them, the dialog box temporarily disappears to enable you to select points or objects and otherwise perform operations that require a clear view of the drawing area.

In step 7, you received a warning message that you were about to redefine the existing door block. But originally, you inserted the door as a file, not as a block. Whenever you insert a drawing file by using the Insert Block tool, the inserted drawing automatically becomes a block in the current drawing. When you redefine a block, however, you do not affect the drawing file you imported. AutoCAD changes only the block within the current file.

You've just redefined the door block. Now place the door in the wall of the room:

  1. Choose Erase from the Modify toolbar and then click the door. Notice that the entire door is one object instead of individual lines and an arc. Had you not selected the Convert To Block option in step 5, the components of the block would have remained as individual objects.

  2. Now insert the door block again, by using the Insert Block tool in the Draw toolbar or by choosing Modify   Insert Block. This time, however, use the Nearest Osnap override and pick a point on the right-side wall of the bathroom, near coordinate 9'-4 ² ,2'-1 ² . Metric users should insert the door near 284,63.4.

  3. Use the Grips feature to mirror the door, using the wall as the mirror axis so that the door is inside the room. Your drawing will look like Figure 4.7.

    click to expand
    Figure 4.7: The bathroom floor plan thus far

    Tip  

    To mirror an object using grips, first be sure that the Grips feature is on (it is usually on by default). Select the objects to mirror, click a grip, and then right-click. Select Mirror from the shortcut menu; then indicate a mirror axis with the cursor.

Next , you'll see how you can update an external file with a redefined block.

Saving a Block as a Drawing File

You've seen that, with very little effort, you can create a symbol that can be placed anywhere in a file. Suppose you want to use this symbol in other files. When you create a block by using the Block command, the block exists within the current file only until you specifically instruct AutoCAD to save it as a drawing file on disk. For an existing drawing that has been brought in and modified, such as the door, the drawing file on disk associated with that door is not automatically updated. To update the Door file, you must take an extra step and use the Export option on the File menu. Let's see how this works.

Tip  

You can extract blocks that are embedded in other drawings by using a feature called the DesignCenter. See Chapter 21.

Start by turning the Tub and Toilet blocks into individual files on disk:

  1. Choose File   Export to open the Export Data dialog box, which is a simple file dialog box.

  2. Open the Files Of Type drop-down list and select Block (*.dwg).

    Tip  

    If you prefer, you can skip step 2, and instead, in step 3, enter the full filename, including the .dwg extension, as in Tub.dwg .

  3. Double-click the File Name text box and enter Tub .

  4. Click the Save button to close the Export Data dialog box.

  5. At the [= (block=output file)/* (whole drawing)] <define new drawing>: prompt, enter the name of the block you want to save to disk as the tub file ”in this case, also Tub . The Tub block is now saved as a file.

  6. Repeat steps 1 through 3 for the Toilet block. Give the file the same name as the block.

    Tip  

    AutoCAD gives you the option to save a block's file under the same name as the original block or with a different name. Usually you will want to use the same name, which you can do by entering an equal sign (=) after the prompt.

    Tip  

    Normally, AutoCAD saves a preview image with a file. This enables you to preview a drawing file before opening it. Preview images are not included with files that are exported with the File   Export option or the Wblock command, which is discussed in the next section.

Replacing Existing Files with Blocks

The Wblock command does the same thing as choosing File   Export, but output is limited to AutoCAD.dwg files. (Veteran AutoCAD users should note that Wblock is now incorporated into the File   Export option.) Let's try using the Wblock command this time to save the Door block you modified:

  1. Issue the Wblock command by typing Wblock , or use the keyboard shortcut by typing w to open the Write Block dialog box.

    click to expand
  2. In the Source button group, click the Block radio button.

  3. Select Door from the drop-down list. Notice that the options under the Destination group change to reflect the location of the old Door.dwg file from which the Door block was originally inserted. You can keep the old name or enter a different name if you prefer.

  4. In this case, you want to update the door you drew in Chapter 2, so click OK.

  5. You'll see a warning message telling you that the Door.dwg file already exists. Go ahead and click Yes to confirm that you want to overwrite the old door drawing with the new door definition.

In this exercise, you typed the Wblock command at the command prompt instead of using File   Export. The results are the same, regardless of which method you use. If you are in a hurry, the File   Export command is a quick way to save part of your drawing as a file. The Wblock option might be easier for new users because it offers options in a dialog box.

Understanding the Write Block Dialog Box Options

The Write Block dialog box offers a way to save parts of your current drawing as a file. As you can see from the dialog box shown in the previous exercise, you have several options to work with.

In that exercise, you used the Block option of the Source button group to select an existing block as the source object to be exported. You can also export a set of objects by choosing the Objects option. If you choose this option, the Base Point and Objects groups become available. These options work the same way as their counterparts in the Block Definition dialog box that you saw earlier when you created the Tub and Toilet blocks.

The other option in the Source button group, Entire Drawing, lets you export the whole drawing to its own file. This might seem to duplicate the File   Save As option in the menu bar, but saving the entire drawing from the Write Block dialog box actually performs some additional operations, such as stripping out unused blocks or other unused components. This has the effect of reducing file size. You'll learn more about this feature later in this chapter.

Other Uses for Blocks

So far, you have used the Make Block tool to create symbols, and you have used the Export and Wblock commands to save those symbols to disk. As you can see, you can create symbols and save them at any time while you are drawing. You have made the tub and toilet symbols into drawing files that you can see when you check the contents of your current folder.

However, creating symbols is not the only use for the Insert Block, Block, Export, and Wblock commands. You can use them in any situation that requires grouping objects (though you might prefer to use the more flexible Object Group command discussed in the next section). You can also use blocks to stretch a set of objects along one axis by using the Properties palette. Export and Wblock also enable you to save a part of a drawing to disk. You will see instances of these other uses of the Block, Export, and Wblock commands throughout the book.

Make Block, Export, and Wblock are extremely versatile commands and, if used judiciously, can boost your productivity and simplify your work. If you are not careful, however, you can also get car- ried away and create more blocks than you can keep track of. Planning your drawings helps you determine which elements will work best as blocks and recognize situations in which other methods of organization are more suitable.

Another way of using symbols is to use AutoCAD's external reference capabilities. External referenced files, known as Xrefs , are files inserted into a drawing in a way similar to blocks. The difference is that Xrefs do not actually become part of the drawing's database. Instead, they are loaded along with the current file at startup time. It is as if AutoCAD opens several drawings at once: the main file you specify when you start AutoCAD, and the Xrefs associated with the main file.

start sidebar
An Alternative to Blocks

Another way to create symbols is by creating shapes . Shapes are special objects made up of lines, arcs, and circles. They can regenerate faster than blocks, and they take up less file space. Unfortunately, shapes are considerably more difficult to create and are less flexible to use than blocks.

You create shapes by using a coding system developed by Autodesk. The codes define the sizes and orientations of lines, arcs, and circles. You first sketch your shape, convert it into the code, and then copy that code into a text file. To learn more about shapes, see your AutoCAD Customization Guide in the Auto- CAD Help .

end sidebar
 

By keeping the Xrefs independent from the current file, you make sure that any changes made to the Xrefs automatically appear in the current file. You don't have to update each inserted copy of an Xref, as you must for blocks. For example, if you use the External Reference option on the Reference toolbar (discussed in Chapter 12) to insert the Tub drawing, and later you make changes to the tub, the next time you open the Bath file, you will see the new version of the tub.

Xrefs are especially useful in workgroup environments, where several people are working on the same project. One person might be updating several files that have been inserted into a variety of other files. Before Xrefs were available, everyone in the workgroup had to be notified of the changes and had to update all the affected blocks in all the drawings that contained them. With Xrefs, the updating is automatic. Many other features are unique to these files, and they are discussed in more detail in Chapters 6 and 12.




Mastering AutoCAD 2005 and AutoCAD LT 2005
Mastering AutoCAD 2005 and AutoCAD LT 2005
ISBN: 0782143407
EAN: 2147483647
Year: 2004
Pages: 261
Authors: George Omura

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net