Using Blocks to Organize Objects


Blocks are one of the oldest methods for grouping objects in AutoCAD. Used properly, they can be a real time-saver. They have the unique ability to be edited globally. For example, you can create a drawing of a chair and then turn it into a block so that the chair behaves as one object. You can then make hundreds of copies of that chair by copying its block form. These copies are referred to as block references. If you need to modify the chair later, you can modify one of the block references, and all the other chairs blocks update automatically.

Creating a Block

You can easily create blocks from existing objects by following these steps:

  1. image from book In the 2D Draw control panel, click the Make Block tool, enter b, or choose Draw è Block è Make to open the Block Definition dialog box (see Figure 8.1).

    If you don't see the Make Block tool in the 2D Draw control panel, look in the toolbar fly-out menu to the far right of the top row of the control panel tools.

  2. In the Name text box, enter a name for your block. You need to give the block a name to make it easily identifiable in lists or other dialog boxes.

  3. In the Base Point section, click the Pick Point button. This option lets you select a base or an insertion point for the block using your cursor. (The insertion point of a block is like its primary grip point. It is the first point you use to locate the block when it is first inserted into a drawing.) After you select this option, the Block Definition dialog box temporarily closes.

    The Block Definition dialog box gives you the option of specifying the X, Y, and Z coordinates for the base point, instead of selecting a point.

  4. Pick a point that will be useful when you insert the symbol. For example, if it is a symbol for a datum point, pick its center. If it's a symbol for a door, pick the door's hinge location.

    After you select a point, the Block Definition dialog box reopens. Notice that the X, Y, and Z values in the Base Point section are now the coordinates of the point you picked. For two-dimensional drawings, the Z coordinate should remain at 0.

    Next, you need to select the actual objects you want as part of the block.

    image from book

  5. In the Objects section, click the Select Objects button. Once again, the dialog box momentarily closes. You now see the familiar Object Selection prompt in the command line, and the cursor becomes an Object Selection cursor. Select the objects that you want as part of your block.

  6. When you've finished your selection, press to return to the dialog box.

  7. From the Block Unit drop-down list, select Inches. Metric users should select the appropriate metric measurement from the list.

  8. Click the Description list box, and enter a brief description of your block.

  9. Make sure that the Convert to Block radio button in the Objects section is selected. Click OK. The objects you selected in step 5 are now a block with the name you entered in step 2.

    You can press , or right-click and choose Repeat Make from the shortcut menu, to start the Make Block tool again.

image from book
Figure 8.1: The Block Definition dialog box

When you turn an object into a block, it is stored within the drawing file as a block definition, ready to be inserted into the drawing at any time. The block definition remains part of the drawing file even when you end the editing session. When you open the file again, the block definition is available for your use. In addition, you can access block definitions from other drawings using the AutoCAD DesignCenter and the tool palettes. You'll learn more about DesignCenter and the tool palettes later in this chapter.

Understanding the Block Definition Dialog Box

The Block Definition dialog box includes several options that can simplify the use of blocks. If you're interested in these options, take a moment to review the Block Definition dialog box as you read these descriptions.

You've already seen how the Name text box lets you enter a name for your block. AutoCAD does not let you complete the block creation until you enter a name.

You've also seen how to select a base point for your block. The base point is like the handle of the block. It is the reference point you use when you insert the block into the drawing. It is also the primary grip point for the block. In the previous example, you used the Pick Point option to indicate a base point, but you can also enter X, Y, and Z coordinates just below the Pick Point option. In most cases, however, you will want to use the Pick Point option to indicate a base point that is on or near the set of objects you are converting to a block.

The Objects section lets you select the objects that make up the block. You use the Select Objects button to visually select the objects you want to include in the block you're creating. The QuickSelect button to the right of the Select Objects button lets you filter out objects based on their properties.

Other options in the Objects section let you specify what to do with the objects you're selecting for your block. Table 8.1 lists the Block Definition dialog box options and what they mean.

image from book
Table 8.1: Other Block Definition Dialog Box Options
Open table as spreadsheet

OPTION

PURPOSE


Retain

Keeps the objects you select for your block as they are, unchanged.

Convert to Block

Converts the objects you select into the block you're defining. The block then acts like a single object once you've completed the Block Definition dialog box.

Delete

Deletes the objects you selected for your block. This is what AutoCAD did in earlier versions. You might also notice that a warning message appears at the bottom of the Objects section. This warning tells you whether you've selected objects for the block. Once you've selected objects, this warning changes to tell you how many objects you've selected.

Annotative

Allows you to apply an annotative scale to the block. This feature gives the block the ability to adjust its size to the scale of the drawing. You set the scale through the Annotative Scale setting in Model view or the VP Scale setting in a layout viewport.

Match Block Orientation to Layout

Causes the block to always display in "read right" orientation in Layout view.

Scale Uniformly

Locks the blocks X and Y scale to their original proportions.

Allow Exploding

Allows the block created in the current Block Definition dialog box to be broken down into its component objects using the Explode command.

Block Unit

Lets you determine how the object is to be scaled when it's inserted into the drawing. By default, this value is the same as the current drawing's insertion scale.

Description

Lets you include a brief description or keyword for the block. This option is helpful when you need to find a specific block in a set of drawings.

image from book

Inserting a Block

If you delete all the blocks in a drawing, you can still insert a copy of a block at any time, as many times as you want. This is because blocks are stored within the drawing's database as block definitions and are not removed unless you specifically remove them using the Purge command.

To insert a block into the drawing area, do the following:

  1. image from book In the 2D Draw control panel, click the Insert Block tool or enter i to open the Insert dialog box (see Figure 8.2). If there are blocks in the drawing, you will see a preview of the block in the upper-right corner of the dialog box.

  2. Click the Name drop-down list to display a list of the available blocks in the current drawing (see Figure 8.3). Once you select a block name, a preview will appear in the upper-right corner of the dialog box.

  3. Click the name of the block you want to insert.

  4. Click OK to display a preview image attached to the cursor. The base point you selected when you created the block is now on the cursor.

  5. Click a point to place the block in the drawing. If the Specify On-Screen option is checked in the Insertion Point group of the Insert dialog box, the block will appear on or near the cursor, and you will be prompted for an insertion point.

image from book
Figure 8.2: The Insert dialog box

image from book
Figure 8.3: The Name drop-down list shows the available blocks in a drawing.

Scaling and Rotating Blocks

When you insert a block, it appears at the scale and orientation that was used when the block was originally created. In some instances, you might want the block inserted at a rotated angle or at a different size from the original. The Insert dialog box provides two sets of options that let you scale or rotate your block at the time you insert it. If you turn on the Specify On-Screen option in the Rotation section of the dialog box, you are prompted for a rotation angle once you've selected an insertion point. You can specify a rotation angle either by entering an angle value from 0 to 360 or by visually selecting a rotation angle using the cursor. The block rotates with the cursor around the insertion point until you select a rotation angle. You might find that you want the rotation's Specify On-Screen option turned on most of the time so you can adjust the rotation angle of the block while you are placing it in the drawing.

The other options in the Insert dialog box that you did not use are in the Scale section. These options let you scale the block to a different size. You can scale the block uniformly, or you can distort the block by individually changing its X, Y, or Z scale factor. With the Specify On-Screen option unchecked, you can enter specific values in the X, Y, and Z text boxes to stretch the block in any direction. If you turn on the Specify On-Screen option, you'll be able to visually adjust the X, Y, and Z scale factors in real time. Although these options are not used often, they can be useful in special situations if a block needs to be stretched one way or another to fit in a drawing.

You aren't limited to scaling or rotating a block when it is being inserted into a drawing. You can always use the Scale or Rotate tool or modify an inserted block's properties to stretch it in one direction or another.

If you select the block and then open the Properties palette, you'll see the properties for the block, including the X, Y, and Z scale values (see Figure 8.4).

image from book
Figure 8.4: The block properties

Take a moment to study the Properties palette. Under the Geometry heading, you'll see a set of labels that show Position and Scale. These labels might appear as "Pos" and "Sca" if you've adjusted the width of the palette to be too narrow to show the entire label.

Remember that you can drag the left or right edge of the palette to change its width or drag the vertical separator inside the palette to adjust the width of the columns.

You can change Scale values so that the block is wider or taller than the original block. For example, you can enter 1.5 in the Scale X text box (to the right of the Scale X label) to increase its width by a factor of 1.5.

Once a block has been inserted, you can rotate or uniformly scale it using the Rotate or Scale command.

Understanding the Annotation Scale

One common use for AutoCAD's block feature is to create reference symbols. These are symbols that refer the viewer to other drawings or views in a set of drawings. An example of this would be an elevation symbol on a floor plan that directs the viewer to look at a location on another sheet to see an elevation view of a room. Such a symbol is typically a circle with two numbers, one for the drawing sheet number and the other for the view number on the sheet.

In the past, AutoCAD users had to insert a symbol multiple times to accommodate different scales of the same view. For example, the same floor plan might be used for a ¼" = 1'1" scale view and a " = 1'0" view. An elevation symbol that works for the ¼" = 1'1" scale view would be too small for the " = 1'0" view so two copies of the same symbol would be inserted, one for each scale. The user would then have to place the two symbols on different layers to control their visibility.

The annotation scale feature does away with this need for redundancy. You can now use a single instance of a block even if it must be displayed in different scale views. To do this, you must take some additional steps when creating and inserting the block. Here's how you do it:

  1. Draw your symbol at the size it should appear when plotted. For example, if the symbol is supposed to be a ¼" circle in a printed sheet, draw the symbol as a ¼" circle.

  2. Open the Block Definition dialog box by choosing the Make Block tool from the 2D Draw control panel.

  3. Turn on the Annotative option in the Behavior section of the Block Definition dialog box. You might also turn on the Match Block Orientation to Layout option if you want the symbol to always appear in a vertical orientation.

  4. Select the objects that make up the block, and indicate an insertion point as usual.

  5. Click OK.

    image from book

After you've followed these steps, you'll need to apply an annotation scale to the newly created block:

  1. Click the new block to select it.

  2. Right-click, and choose Annotative Object Scale è Add/Delete Scales. The Annotation Object Scale dialog box appears.

  3. Click the Add button. The Add Scales to Object dialog box appears.

  4. Select the scale from the list you'll be using with this block. You can Ctrl+click to select multiple scales. When you are finished selecting scales, click OK. The selected scales appear in the Annotation Object Scale dialog box.

    image from book

  5. Click OK to close the Annotation Object Scale dialog box.

    image from book

At this point, the block is ready to be used in multiple scale views. You need only to select a scale from the Model view's Annotation Scale drop-down list or the Layout view's VP (Viewport) Scale drop-down list, which are both in the lower-right corner of the AutoCAD window.

image from book

The Annotation Scale drop-down list appears in Model view, and the VP Scale drop-down list appears in Layout view and when a viewport is selected (see Chapter 12 for more about layouts and viewports). In Layout view, you can set the VP Scale value for each individual viewport so the same block can appear at the appropriate size of different scale viewports (see Figure 8.5). If you only need to use one annotation scale for the block, set the Annotation scale drop-down list first, then insert the block. The block will be given the current Annotation scale automatically.

image from book
Figure 8.5: A single block is used to create different size elevation symbols in this Layout view. Both views show the same floor plan displayed at different scales.

Note that if you want to use several copies of a block that is using annotative scales, you should create the block and assign the annotation scale first and then make copies of the block. If you insert a new instance of the block, you'll have to assign an annotation scale to the new instance of the block. If you are uncertain whether an annotation scale has been assigned to a block, you can click the block, and you will see the different scale versions of the block highlighted. Also, if you hover over a block, you'll see a triangular symbol next to the cursor for blocks that have been assigned annotation scales.

If you find you need to change the position of a block for a particular layout viewport scale, go to Model view, select the appropriate scale from the Annotation Scale drop-down list, and then adjust the position of the block.

image from book

Importing an Existing Drawing as a Block

Earlier in this chapter, you saw how to create a block from a set of objects in a drawing. You can also treat external drawing files as blocks. For example, you might have drawings of a chair, a table, and other fixtures, each in its own separate file. You can insert those files as if they were blocks in the current drawing. This requires a slightly different way of using the Insert command:

  1. image from book In the 2D Draw control panel, click the Insert Block tool or enter i to open the Insert dialog box.

  2. Click the Browse button to the right of the Name drop-down list to open the Select Drawing File dialog box, which is a standard AutoCAD file dialog box (see Figure 8.6).

  3. Locate and select the drawing you want to insert.

  4. Back in the Insert dialog box, click OK to display a preview image of the file attached to the cursor.

  5. Click a point to place the block in the drawing.

image from book
Figure 8.6: The Select Drawing File dialog box

You can also use Windows Explorer to drag AutoCAD .dwg files to the AutoCAD window.

When you insert a file in this way, the file becomes a block in the current drawing, and as with any block, if you erase all instances of the inserted file from the drawing, it remains in the file as a block definition ready for you to insert again at a later time if needed. Also, be aware that if such a block is deleted from a drawing, its original source file remains untouched.

When you insert a drawing file as a block, AutoCAD uses the drawing's origin, 0,0, as the insertion base point. To modify the base point of any drawing, enter Base at the command prompt, and then select the point you want as the drawing's base point.

image from book
EDITING A BLOCK

If you need to make changes to a block, you can use the Block Editor described in Chapter 5. Remember that by updating one block, all instances of the block that appear in a drawing are also updated. This can help you make quick work of repetitive items in a drawing.

If you need to change only one instance of a block, use the Explode command to reduce a block to its constituent parts. If you are working on a project involving multiple AutoCAD users, make sure exploding a block is OK with your coworkers.

image from book

Saving Blocks as AutoCAD Drawing Files

As mentioned earlier, whenever you insert a drawing file 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 source file you imported. AutoCAD changes the block only within the current file.

You do have the option to save changes to a block back to the original file from which it came using the Write Block feature. The following steps describe the process:

  1. Issue the Wblock command by typing Wblock or enter w to open the Write Block dialog box, as shown in Figure 8.7.

  2. In the Source section, click the Block button.

  3. Select the name of the block you want to export from the drop-down list. If the block was originally a file you imported, you'll see the original filename in the File Name and Path input box.

  4. Click OK.

  5. If you're replacing an existing file, you'll see a warning message telling you that the file already exists. Click Yes to confirm that you want to overwrite the old drawing with the new definition.

image from book
Figure 8.7: The Write Block dialog box

The Write Block dialog box offers a way to save parts of your current drawing as a file. In the previous exercise, you used the Block option in the Source section to select an existing block as the source object to be exported. You can also export a set of objects by clicking the Objects button. If you choose this option, the Base Point and Objects sections become available. These options work the same way as their counterparts in the Block Definition dialog box that you saw earlier.

Selecting the third option in the Source section, 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.




Introducing AutoCAD 2008
Introducing AutoCAD 2008
ISBN: 0470121505
EAN: 2147483647
Year: 2007
Pages: 147
Authors: George Omura

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