In Chapter 7, “Combining Objects into Blocks,” you explored creating and using blocks to combine separate objects into a single, complex object to aid in selecting objects and editing properties. Chapter 8, “Controlling Text in a Drawing,” covered the addition of text into drawings. In this chapter, you will expand your knowledge of blocks and use text inside blocks and tables to display information about specific features of a drawing.
The blocks you've worked with have been static collections of objects that you have inserted throughout your drawing as doors or windows. Each instance of the same block was visually identical to the others, and you were able to scale the window blocks along one axis and without distortion to fit the walls. Blocks can also contain textual information, called attributes, which are specific to an individual block instance. Blocks do not have to remain static and unchanging. In this chapter, you will learn how to define your blocks so that they can change as required, without needing to explode the blocks and modify the component objects.
After exploring blocks further, you'll learn how to create a table to act as a door schedule, displaying the door type, unit price, and total cost. A schedule is a chart in a drawing that contains logically organized information about a particular component of a project, such as a steel baseplate, valve, bolt, screw, door, window, or room finish. Each of these components has its own schedule. Information in a door schedule, for example, might include size, material, finish, location, and type of jamb.
In Chapter 8, you added a series of gridlines to your cabin. These gridlines were placed at the centerlines of structural components such as walls or columns. Especially in larger plans, these gridlines often provide critical points of reference for collaborating with contractors and other consultants over the phone. What makes the structural gridlines so useful is the way that they're labeled. Gridlines are most often labeled using a circle or hexagon with numbers running in one direction (horizontally or vertically) and letters running in the other. Because more-elaborate floor plans will likely have multiple closets, for instance, it's rather ambiguous to ask someone to look at the closet in a plan. Instead you might say, “Have a look at the closet near gridline intersection C2.”
Just as the gridlines help make your printed plans more useful, blocks can do the same inside your drawings by combining multiple related objects into a single entity in the Autodesk® AutoCAD® software. Because each grid needs to have a unique letter or number, creating a static block as you did in Chapter 7 won't work for this application. Instead, you need a block that can display a unique number or letter for each block insertion. You can achieve this level of interaction with any block by adding attributes to its definition.
A simple but handy use of attributes is to make the letter or number in the circle an attribute and then make a block out of the attribute and circle. By redoing the grid symbols in the cabin drawing, you'll learn how to set up attributes and create a new block that can be used in any other drawing. Because you'll define the block as an annotative block, the grid label blocks you create will not be scale dependent.
The drawing consists of the floor plan with a structural grid, notes, and a title block.
TIP You've already seen how the -LAYER command can be used to create new layers, but it can also be useful in layer management. Instead of freezing the two A-ANNO-TTLB layers individually, try entering -LAYER F *TTLB*. This command sequence tells AutoCAD to freeze all TTLB layers at once. The asterisk (*) is a wildcard character that tells AutoCAD to look for any layers with TTLB in their names—and, in this case, freeze them.
In this case, the letters run horizontally across the top, and the numbers run vertically along the side.
Turn off the Automatically Add Annotative Scales mode from the status bar (the icon dims, and the lightbulb turns gray).
Start the SCALE command.
This reduces the circle to its actual plot height.
Start the ATTDEF command by clicking the Define Attributes button on the Insert tab Block Definition panel. The Attribute Definition dialog box opens (see Figure 9.3).
In the Attribute group are three text boxes: Tag, Prompt, and Default. The cursor is flashing in the Tag text box. Think of the letter in the grid circle. It's a grid letter, which is a tag that provides the visual textual information.
Here you enter a prompt that will display for a future user. When a user inserts a block containing the attribute, the prompt will ask the user to input text for the tag.
Here you enter a default or sample value that will be used if the future user presses instead of entering a new value. You want the letter capitalized in this case, so enter A.
This sets up the attribute so that the user setting up the grid will be prompted to enter the grid letter and will be given a default of A. The capital A lets the user know that the letter should be uppercase.
The lower portion of the dialog box is where you set up parameters for the attribute text: location in the drawing, justification, text style, height, and rotation.
Because the A-Label text style is annotative, the Annotative check box is automatically selected. Likewise, because a text height other than 0′-0″ (0) is associated with the A-Label text style, the Text Height text box is grayed out.
The Attribute Definition dialog box should look like Figure 9.4.
GRID-LETTER is centered over the circle (see Figure 9.5), and the ATTDEF command ends.
The text over the circle is called the attribute definition. Its function in AutoCAD is similar to that of a block definition. When you made the A-GLAZ block for the windows, the definition was a 12″ (305 mm) long window with an insertion point. When the A-GLAZ block is inserted, you can use the original block definition to make windows of various sizes. The same is true for the attribute definition. When it becomes part of a block that's inserted, the attribute can be any letter you want. You'll see that happen in a minute. First make a similar attribute definition for the numbered grid symbol:
The second attribute definition is centered over the circle (see Figure 9.6).
You now have two attribute definitions, and you are ready to make each of them part of a block that includes the circle over which they're currently centered.
You have to define two blocks for the grid symbols and their attributes. The insertion point for the block used for the top of the grid should be at the lowest point of the circle. The insertion point for the block used for the left side should be at the point on the circle farthest to the right. Follow these steps:
The Block Definition dialog box reopens.
The block is defined, and it includes the attribute definition. In the drawing, the top circle and attribute definition have been deleted.
When you complete the command, you have a second block definition that includes an attribute definition and no grid circles in the drawing.
Let's insert these blocks (which are now grid symbols) at the endpoints of the grid-lines. As you insert them, you'll assign them the appropriate letter or number, but first you'll make sure that AutoCAD uses a dialog box to prompt for the user input:
Click the Insert button in the Block panel or enter I .
The ATTDIA variable defines whether the INSERT command opens a dialog box or prompts the user at the command prompt for attribute information. When the variable is set to 0, no dialog box is used.
Now look at the bottom line in the command line or the command prompt at the cursor, as shown in Figure 9.8. This is the text you entered in the Attribute Definition dialog box for the prompt. A is the text you entered as the default value. The last line also appears at the command prompt attached to the cursor.
Pressing inserts the grid symbol at the endpoint of the leftmost vertical gridline (see Figure 9.9).
The second grid symbol is inserted on a gridline, and the letter B is located in the circle. Be sure to use a capital B here; the tag will not prevent you from using a lowercase letter, but drawing standards require consistency.
Although you defined the GRID-V block at a much smaller scale, notice how it inserts at the correct scale. Just as text does, an annotative block sizes itself based on the current annotation scale when you insert it.
To illustrate how you can edit attribute text, let's assume that you decide to change the C grid symbol to B1. You must then change the D symbol to C. Here are the steps:
Doing so opens the Enhanced Attribute Editor dialog box shown in Figure 9.11. You can change several items here, but you want to change only the Value parameter.
B1 replaces C in the larger window where the tag, prompt, and value appear together.
NOTE Because you set the justification point for the attribute text to Middle Center and located the text at the center of the grid circle, the B1 text is centered in the circle, just like the single letters.
The exercises in this chapter so far have illustrated the basic procedures for defining, inserting, and changing attributes. You can apply these same procedures to the process of setting up a title block in which attributes are used for text that changes from one sheet to the next. You can now move to a more complex application of the attribute feature to see its full power.
The cabin has three rooms and two decks, with the kitchen and living room sharing the same space. Each room has a different area and floor covering. You can store this information, along with the room name, in the drawing as attributes. You'll set up a block that consists of three attributes (name, area, and covering). You'll then insert the block back into the floor plan. As you may remember, the text style for the room labels is A-Label. You'll use that for the attributes.
You have to erase the room labels for now, but it will be handy to mark their justification points. That way, you can insert the attribute exactly where the label text is now. Follow these steps:
Thaw the A-ANNO-TTLB-TEXT layer.
NOTE A point is a single location in space, defined by an X, Y, and Z position, with no area or volume. The Point Style dialog box determines how the marker at the point location appears. By default, the point appears as a single pixel, which can be visually lost in the drawing.
Click the fourth point style example in the second row (the one with a circle and an X). Then click OK to close the dialog box.
Set the Insertion osnap to be running, and then click the Multiple Points button on the expanded Draw panel on the Home tab to start the POINT command.
The decks don't have any associated text in this drawing, so you can place the attribute anywhere you want.
The drawing should look like Figure 9.14.
Because you're going to make a block out of it and reinsert it into the rooms, you don't have to place the attribute definition where the room labels are positioned; any open area in the drawing is fine.
TIP Because you're drawing at a scale of 1:1, the attribute definition will be very small in relation to the rest of your drawing. Instead of using Zoom Window, try selecting the attribute definition and then choosing the Zoom Object option from the navigation bar. This will zoom in on the selected attribute definition.
The Invisible mode makes the attribute values invisible in the drawing, but they're still stored there and can be accessed when required.
All the text options fade out (see Figure 9.16). The style is the same as that of the first attribute, and this attribute definition will appear right below the first one.
Now you'll make a block out of the three attributes.
A block with attributes usually includes lines or other geometric objects along with the attribute definitions, but it doesn't have to do so. In this case, the three attribute definitions are the sole content of the block, and the block's insertion point is the justification point for the first attribute: the room label text. Follow these steps to define the block:
Doing so aligns the justification point of this attribute with the insertion point of the block.
Selecting them in this order causes them to be listed in the Enter Attributes dialog box in the same order.
The A-ROOM-IDEN block is defined, and the attribute definitions are deleted from the drawing.
You're almost ready to insert the A-ROOM-IDEN block in each of the three rooms and the decks. But first you need to calculate the area of each room.
You can calculate areas in a drawing by using the HATCH command in conjunction with the Properties palette or by using the Area tool. Because area calculations are made over and over again in design, construction, and manufacturing, the AREA and MEASUREGEOM commands are important tools. You can calculate an overall area and then subtract subareas from it, or you can add subareas together to make a total. Chapter 11, “Working with Hatches, Gradients, and Tool Palettes,” covers hatches.
For this exercise, you'll use the Area tool to calculate the areas of the five floor spaces in the floor plan. You need to write down the areas after you make the calculations. Follow these steps:
The lines you'll draw on the A-AREA-NPLT layer will be used for reference and not plotted in your final plans. This is why we're using the NCS code NPLT, which stands for No Plot.
TIP When you want to select all the layers in a drawing except a few, select those few layers in the Layer Properties Manager, right-click, and choose Invert Selection from the context menu. The unselected layers become selected, and the selected layers are deselected.
Your cabin should be divided as shown in Figure 9.20.
Now that the perimeter lines are drawn, you need to calculate the area bound by them:
Turn on Selection Cycling from the status bar.
This will help you select the polylines you just drew when they overlap other lines in the drawing.
If the Selection dialog box opens after you've made your selection, hover over each of the objects displayed in the list until you find the polyline along the perimeter of the bathroom highlights (see Figure 9.22).
The text window displays the results of your calculation: Area = 7176.00 square in. (49.8333 square ft.), Perimeter = 28′-4″. (Area = 4455000, Perimeter = 8460). You'll also notice that you're not actually in the AREA command; you're in the Area option of the MEASUREGEOM (Measure Geometry) command. This command combines many of the older inquiry commands such as AREA and DISTANCE into a single command.
The area should be 135.9792 square feet (12660810). Write down this number. (You can round it to two decimal places; you just want to be able to verify the numbers that AutoCAD will calculate.)
NOTE The Add and Subtract options in the Area prompt allow you to add together areas you have calculated and to subtract areas from each other. If you're going to add or subtract areas, enter A after you start the AREA command. Then, after each calculation, you'll be given the Add and Subtract options. If you don't enter A at the beginning, you can make only one calculation at a time.
To use the Properties palette to calculate an area, select the polyline to be measured, open the Properties palette, and then scroll down to the Area readout in the Geometry rollout. The area appears in square inches and square feet. This also works for hatch patterns, which are covered in Chapter 11.
You have five areas calculated and recorded, and you are ready to insert the A-ROOM-IDEN block. When you inserted the grid symbols as blocks with attributes earlier in this chapter, the prompts for the attribute text appeared in the command-line interface. With multiple attributes in a block, it's more convenient to display all the prompts in a dialog box. Let's change the setting that makes the dialog box replace the command prompts:
This allows the dialog box containing the prompts to open during the insertion process.
The only change you need to make is the value for Area Of Room. The defaults are correct for the other two items.
Rather than inputting text, you'll instruct the attribute to read the Area parameter from the polyline.
The Field dialog box opens. In the Field Names column, choose Object and click the Select Object button (see Figure 9.25).
The dialog box closes so that you can pick the object that the field will reference.
The Field dialog box reopens with additional content in its list boxes.
The correct area measurement appears in the top-right corner of the dialog box (see Figure 9.26).
If you're working in Architectural units, you can skip to step 19. If you're working in metric units, continue with the next step.
Notice the value in the Preview window in the top-right corner of the dialog box. The number is much too large to be defining the area of the living room in square meters; instead, it's showing the area in square millimeters. Therefore, you need to multiply the value calculated by a conversion factor to display the correct value.
One square meter equals 1,000,000 square millimeters (1000×1000), so each square millimeter is 1/1,000,000 of a square meter.
Be sure to place a space prior to the M to ensure a gap between the suffix and the calculated area. Your Additional Format dialog box should look like Figure 9.27.
Note that the Preview section in the Field dialog box now shows the correct value of 26.18 M2, as you can see in Figure 9.28.
The Area Of Room value is now shown with a gray background, as you can see in Figure 9.29, to identify it as a field rather than a text element.
The room label is the only visible attribute (see Figure 9.30). You set the other two attributes to be invisible.
The remaining four block insertions are almost identical to the first one, with just a few specific changes: changing the room name and referencing a different polyline. Follow these steps to copy and modify the block and attributes that you've created:
Both dialog boxes disappear, and the cursor turns into a pickbox.
If you're using metric units, do the following:
The revised BATH attribute is now properly placed in the drawing.
There are no node point objects for the deck text, so you can just rotate and place the attribute a little left of center on the appropriate deck. For the decks, change the floor material to Cedar Planks. Metric users will need to open the Additional Format dialog box for each block and add the conversion factor and suffix for each block. When you are finished, your cabin should look like Figure 9.32.
EDITING TOOLS FOR ATTRIBUTES
The attribute-editing tools seem complicated at first because their names are similar, but they are easily distinguishable once you get used to them and know how to use them. Here are descriptions of five attribute-editing tools.
The Edit Attributes Dialog Box
This is the same dialog box displayed in the process of inserting a block that has attributes, if the ATTDIA setting is set to 1. This dialog box is used to change attribute values only. Enter ATTEDIT to use it to edit values of attributes already in your drawing. You will be prompted to select a block reference in your drawing. When you do that, the Edit Attributes dialog box appears.
The Enhanced Attribute Editor Dialog Box
With this dialog box, you can edit values and the properties of the attribute text—such as color, layer, text style, and so on. When you enter EATTEDIT or click Modify Object Attribute Single or click the Edit Attribute (Single) button in the Block panel on the Insert tab and then pick a block that has attributes, the dialog box opens. Double-clicking the block has the same effect.
The Properties Palette
Use the Properties palette to edit most properties of attribute definitions. Select the attribute definition, and then right-click and choose Properties to open the Properties palette. Then scroll down to the Attributes rollout.
The Block Attribute Manager
Click the Attribute, Block Attribute Manager button in the expanded Block panel on the Home tab, or enter BATTMAN at the command line to open the Block Attribute Manager dialog box. There you can select a block and edit the various parts of each attribute definition that the block contains, such as the tag, prompt, and value.
The -Attedit Command
You can also edit more than one attribute at a time by clicking Edit Attributes (Multiple) from the Attributes panel of the Insert tab, by choosing Modify Object Attribute Global, or by entering -ATTEDIT. The prompt reads Edit attributes one at a time? [Yes/No] <Y>. If you accept the default of Yes, you're taken through a series of options for selecting attributes to edit. Select the attributes to edit, and then press to end the selection process. A large X appears at the insertion point of one of the selected attributes. At this point, you get the following prompt: Enter an option [Value/Position/Height/Angle/Style/Layer/Color/Next] <N>:, allowing you to modify any of the characteristics listed in the prompt for the attribute with the X. Press to move to the next selected attribute.
If you respond to the first prompt with No, you're taken through a similar set of selection options. You're then asked to enter a current value to be changed and to enter the new value after the change. You can change the values of attributes globally by using the ATTEDIT command this way.
The floor plan looks the same as it did at the beginning of this exercise, except for the addition of the deck labels. But it includes more than meets the eye. What was regular text is now an attribute, and your drawing is “smarter” than it was before. The next few steps illustrate the display controls for the visible and invisible attributes:
All the attributes, including those designated as invisible, appear with the room labels (see Figure 9.34).
NOTE Like the hyperlink you added to the notes in Chapter 8, the fields are shown with a gray background, but this background does not appear in the printed drawings. As you can see, one of the benefits of using attributes over simple text is the ability to control their visibility. However, their true strength is the ability to output attribute values to spreadsheets or databases. When you use fields and formulas (covered in the “Creating a Table” section later in this chapter), the attribute can adjust its values as the circumstances change, as shown in Figure 9.34.
The deck is now larger, but the attribute showing the area remains at its previous value. Attributes need to be instructed to reevaluate or regenerate themselves. This can happen whenever a drawing is opened or when the REGEN or REGENALL commands are issued.
The area updates to show the true value for the associated polyline (see Figure 9.37).
The default command alias for the REGENALL command is REA. For the REGEN command, the default alias is RE.
The visibility of the attributes, as you defined them in the Attribute Definition dialog box, is called their normal state.
All the attributes return to their normal state (see Figure 9.39).
The Display All Attributes and Hide All Attributes options make all attributes in a drawing visible or invisible, regardless of how you set the Visible/Invisible mode in the attribute definition. The Normal setting allows an attribute to be displayed only if the Visible/Invisible mode was set to Visible in the definition.
Along with grid symbols and room, window, and door schedules, another common use for attributes is in standardized title blocks, particularly in facilities management and interior design. You can specify every piece of equipment such as pumps, electrical panels, HVAC air handling units, and even office furniture in a building with attributes. You can then extract the data and generate a schedule that is used to build a database in which ordering and maintenance information can be referenced. Many equipment manufacturers have developed their own proprietary software that works with AutoCAD and automatically sets up attributes when you insert their blocks of the equipment, which they have predrawn and included in the software package.
Attributes are also being used more and more in maps drawn in AutoCAD, which are then imported into geographical information system (GIS) software (a powerful analysis and presentation tool). When map symbols, such as building numbers, are blocks containing an attribute, they're transformed in the GIS program in such a way that you can set up links between the map features (buildings) and database tables that contain information about the map features. In this way, you can perform analyses on the database tables, and the results automatically appear graphically on the map. (For example, you could quickly locate all buildings that have a total usable area greater than a specified square footage.)
In the next section, you'll go through an exercise that demonstrates how you can create dynamic blocks that vary their appearance based on user input.
In Chapter 7, you created blocks for the windows and doors. However, because of the door block's schematic appearance, you were not able to scale it as you did with the window block. Scaling the door and swing would have allowed one door block to fit into any size opening, but it would have also scaled the thickness of the door differently for each door width. Dynamic blocks are standard blocks with additional functionality to allow certain features to change without affecting all objects in the block. The door blocks are an excellent opportunity to explore the abilities of dynamic blocks in AutoCAD.
The basic procedure for setting up a dynamic block has the following stages:
You'll work through this process by converting the A-DOOR-36IN (A-DOOR-0915) block from your cabin drawing into a dynamic block in a new drawing:
The command line changes to Specify base point :.
This copies the door block to the Windows Clipboard.
The A-DOOR-36IN (A-DOOR-0915) block is inserted into your new drawing. Perform a Zoom Extents to bring the entire block into view.
The drawing area turns gray, and the Block Authoring palettes open along with the Block Editor contextual tab to indicate that you are in the Block Editor.
You want to be able to use this door block for openings of the following widths: 2′-0″, 2′-6″, 3′-0″ and 3′-6″ (609 mm, 762 mm, 915 mm, and 1068 mm).
You'll use the Linear parameter to set up the 6″ (153 mm) increments for the door width. Then you'll associate a Stretch action with that parameter to allow the door width to change, and you'll associate a Scale action to allow the door swing to change. Follow these steps:
For the Distance parameter to work, it must be paired with a Dynamic Block action. Note the small exclamation symbol on a square yellow background. This reminds you that no action has been associated with this parameter. You'll set up the Stretch action first:
Click the Actions tab on the Block Authoring Palettes palette set, and then click the Stretch icon.
At the Select objects: prompt, select the door and then press .
The Stretch Action icon appears near the end of the door swing (see Figure 9.45).
The Scale Action icon appears next to the Stretch Action icon, as shown in Figure 9.45.
This completes your work with the Block Authoring Palettes panel. You'll accomplish the rest of the tasks with the Properties palette.
The Distance Linear parameter shows the width of the opening and is perpendicular to the door's width. You need to set up an offset angle so that the door width changes as the opening width changes. Then you need to set up the incremental widths and rename the parameter and actions. You'll set up the increments first:
See Figure 9.46.
The block now has the increment markers for the door opening widths (see Figure 9.47).
Now, the final task is to fine-tune the Stretch and Scale actions that control the door size and swing:
Click the Stretch Action symbol near the end of the door swing.
The symbol, the Distance parameter, and the window you drew earlier ghost.
This is the direction the door will stretch relative to movement of the open end of the door swing arc. The Distance multiplier stays at 1.0000 because you don't want the width of the door to change in the same proportion as the width of the opening.
Deselect this action, and select the Scale action.
Click the Test Block button found on the Block Editor contextual tab Open/Save panel.
A new window opens with the block displayed in the drawing area, the Block Editor contextual tab disappears, and the contextual Close panel (green background) opens on the far-right side of the Ribbon.
Close the Properties palette, and click the Save Block button in the Open/Save panel under the Block Editor contextual tab.
Because the A-DOOR-36IN (A-DOOR-0915) block is now dynamic and able to illustrate doors ranging in size, let's give the block a more appropriate name.
When you use this block in your floor plans, insert it just as you would a regular door block. Then copy it to the various doorway openings in the plan, orient it, and adjust its size to fit the openings. You can easily edit dynamic blocks, which are a versatile feature to have at your disposal.
You'll use the dynamic door block that you just created to replace the doors in your cabin:
Your drawing should look like Figure 9.50.
You will use the A-DOOR block you defined in the I09-DynDoor (M09-DynDoor) drawing. Because this block will take the place of both the A-DOOR-36IN (A-DOOR-0915) and A-DOOR-30IN (A-DOOR-0762) blocks, it's best to remove both from the I09-09-EditRoomAttributes (M09-09-EditRoomAttributes) drawing. Spending a moment to perform some drawing maintenance and clean out unneeded objects will help achieve the best drawing performance. You will delete the block definition by using the Purge dialog box.
From the Application menu, choose Drawing Utilities Purge, or enter PURGE to open the Purge dialog box.
TIP You can purge only those objects and features that do not exist in the drawing, such as deleted blocks, empty layers, or linetypes that are not used. Some items, including layer 0 and the Standard text style, can't be purged. AutoCAD can also accumulate registered applications (regapps), usually from third-party applications or features no longer used in the current drawing, and geometry lines with a length of 0. To eliminate them, you must enter -PURGE to start the PURGE command without the dialog box and then choose the Regapps (R) option. The All option (A) will not purge these types of objects. Run PURGE often to eliminate accumulated junk in your drawing that contributes to larger file sizes and slower performance.
With the Endpoint osnap and Polar Tracking running, click the DesignCenter button on the View tab Palettes panel.
The I09-DynDoor.dwg (M09-DynDoor.dwg) file can also be found in the Chapter 9 download on this book's website at http://sybex.com/go/autocad2013ner or the companion website at http://thecadgeek.com.
The Insert dialog box opens, where you can specify how you would like the A-DOOR block inserted into your drawing.
The A-DOOR dynamic door block appears, attached to the cursor.
This is a 3 ′-0″ (915 mm) door opening, so you don't need to modify the block.
The door is placed properly, but as shown in Figure 9.53, the default size is too large for the opening.
The door block is scaled properly with no distortion to the width of the door itself (see Figure 9.56).
This completes the section on dynamic blocks. If you want to experiment with the dynamic block feature, examine the sample dynamic blocks to see how they work and are set up, and try to create one of your own. The next section covers the methods for creating a table.
Most professions that use AutoCAD use tables to consolidate and display data in organized formats. Architectural construction documents usually include at least three basic tables: door, window, and room finish schedules. These are usually drawn in table form, and they display the various construction and material specifications for each door or window type or for each room. In mechanical drawings, the bill of materials and other specifications can be found in tables. To illustrate the AutoCAD tools for creating tables, you'll construct a simple door schedule for the cabin.
You create tables in AutoCAD by first creating a table style and then creating a table using that style. It's a process similar to that of defining a text style and then inserting text in a drawing using that style.
Table styles are more complex than text styles. They include parameters for the width and height of rows and columns and, among other elements, at least one text style.
Click the Annotate tab. Then click the small arrow in the Tables panel's title bar to open the Table Style dialog box (see Figure 9.57).
On the left is the Styles list box. It displays all of the defined table styles. To the right of that is a Preview Of window that displays the current table style—in this case, the Standard style because it's the only one defined so far. Below the Styles list box is a drop-down list called List that gives you options for which table styles to display. To the right of the preview window are four buttons.
The New Table Style dialog box opens with Schedule in the title bar (see Figure 9.59). The new style you're defining will be like the Standard style with the changes you make here. The dropdown list in the Cell Styles section contains the three parts of the sample table at the bottom-right corner of the dialog box: Data, Header, and Title.
You can specify text and line characteristics for each of the three parts. Be sure the Data option is active in the Cell Styles group.
TIP Not only can each table have its own style, but each cell can have a distinct style as well. By using the Launches The Create A New Cell Style Dialog Box and Launches The Manage Cell Styles Dialog Box buttons in the top-right corner of the New Table Style dialog box, you can design and apply any number of cell styles within a table.
Click the Text tab, and then click the Text Style ellipsis button to the right of the Text Style drop-down list to open the Text Style dialog box.
You want a new text style for the door schedule.
A Height value here allows you to control the height in the New Table Style dialog box.
The table style now appears in the Text Style drop-down list, and the data cells in the two preview windows now show the Arial font.
Switch to the General tab, and click the ellipsis button at the end of the Format row. In the Table Cell Format dialog box, change Data Type to Text and change Format to (None), as shown in Figure 9.60. Then click OK.
The selected data type prevents numeric data from justifying to the right, rather than following the specified Middle Center option.
You'll leave the Border properties at their default settings. These control the visibility of the horizontal and vertical lines of the table, their lineweights, and their colors. Your profession or discipline might have its own standard for these parameters.
Now let's look at the geometry of the new table.
The parameters in the Schedule table style have set the height of the rows. You now need to determine the width of the columns and figure out how many columns and rows you need for the door schedule. You do this as you insert a new table. Remember that Schedule is the current table style. Follow these steps:
The table won't fit inside the title block perimeter, but I'll show you how to give it its own title block in Chapter 14, “Using Layouts to Set Up a Print.”
In the Annotate tab's Tables panel, click the Table button to open the Insert Table dialog box (see Figure 9.63).
In the Table Style group, Schedule appears in the Table Style dropdown list because it's now the current table style. An abstract version of the table appears below, in the preview area.
You'll make a window to define the extents of the table.
You need to define only the number of columns in the table. You won't worry about the row height for now; it's determined by the number of lines of text, and you're using only one line of text.
Each column is initially set to the same width. You can adjust it later.
This establishes the upper-left corner of the new table, so make sure it's below the extents of the title-block border.
The new table appears; its title bar has a flashing cursor and a light-gray background. The background above and to the left of the table is dark gray. The table's columns are indicated by letters, and the rows are numbered. The Text Editor contextual tab and panels appear in the Ribbon.
The cursor moves to the upper-left cell in the table. This is the row for the column headers.
This completes the row of column heads (see the top of Figure 9.65).
NOTE Pressing the Tab key instead of moves the activated cell left to right across each row and then down to the next row. Pressing moves the activated cell down each column and then ends the command. For the Glass and Aluminum material, don't press to move to the next line; simply keep typing. The text wraps automatically, and the cell height changes to accommodate the additional lines of text.
SETTING THE CELL STYLE
If a cell justification doesn't appear correctly or you want to change the style of a cell or range of cells, select the cells you want to change. In the Cell Styles panel under the Table Cell tab, expand the Cell Justification fly-out button and choose the appropriate style.
Currently, all the data cells are configured to hold text information and not numbers. You will now change the Cost column to read the information as numbers and then sum the values in the bottom cell with a formula:
AutoCAD automatically formats the numbers to two decimal places and adds a dollar sign to each, as shown in Figure 9.68.
As in a spreadsheet, a Sum formula adds the values of all the cells in a selected region.
The table is finished, and now you just need to do a little cleanup in your drawing to avoid any problems in the future and to tie elements in the drawing back to the table:
You need a symbol for each door that corresponds to each number in the SYM column.
Your drawing should look like Figure 9.72.
Early in this chapter, you replaced your static room labels with more-versatile attribute blocks. The A-ROOM-IDEN attribute block you defined for your room labels contains three attributes: one set to a visible state and two set to an invisible view state. As you may recall, the two invisible attributes allowed you to enter the area (RM_AREA) and floor material (RM_FLOOR) for each room.
Even though you cannot see either of these attributes in the drawing area, both are still accessible by other parts of the software. You can pull the values from all three attributes contained within the A-ROOM-IDEN block into a table by using the Data Extraction feature of the TABLE command. Using a data-extraction table, AutoCAD will scan your drawing for every insertion of the A-ROOM-IDEN block and compile its data (attributes) into a table that will serve as your room schedule. Let me show you how:
The Data Extraction Wizard opens. This eight-part wizard will walk you through the creation of a data-extraction table.
The Save Data Extraction As dialog box opens.
The Save Data Extraction As dialog box closes, and you're taken to the second step within the Data Extraction Wizard.
TIP Although in this case you're extracting data only from the current drawing, data-extraction tables can pull information from multiple drawings all at once. This feature is useful when using data-extraction tables for quantity takeoffs when each floor of a multilevel building is stored in a separate drawing.
Next, the Data Extraction Wizard asks you to specify the objects from which to extract data. In this case, you're interested only in the data contained within the A-ROOM-IDEN block.
The Data Extraction - Select Objects (Page 3 of 8) dialog box should look like Figure 9.74. After selecting the A-ROOM-IDEN block, click Next to move on to the next step of the wizard.
Next, you need to specify the attributes (properties) you want the data-extraction table to include. In this case, you're interested in only the three block attributes contained within the A-ROOM-IDEN block.
This brings the Attributes category to the top of the list.
This deselects all but the three block attributes contained within your room identification block.
The Display Names will be used as the column headings in your table. Verify that the Data Extraction - Select Properties (Page 4 of 8) dialog box looks like Figure 9.75, and click Next to continue.
You have now selected the data you want included in your data-extraction table. The Refine Data portion of the Data Extraction Wizard will allow you to order the columns and to choose whether to include or exclude the block name and count.
If you were further analyzing your data in a program such as Microsoft Excel, you could send the data extracted from your drawing to an external XLS file.
After you've chosen to insert the data-extraction table into your drawing, the Data Extraction Wizard will prompt you to select which table style you would like to use along with a title for your table.
Your ROOM SCHEDULE inserts to display the block attribute values from the A-ROOM-IDEN block in table form (see the bottom of Figure 9.78).
The ROOM SCHEDULE data extraction is now inserted into your drawing as an AutoCAD Table object. Although the correct table style is in use, its display needs to be tweaked:
Your final table should look like the one shown in Figure 9.82.
This concludes the chapter on dynamic blocks and tables. In the next chapter, you'll look at adding the elevations to the drawings.
This has been a quick tour of the features of attributes and the commands used to set them up and modify the data they contain. In the process, you saw several ways that you can use attributes in an AutoCAD drawing. If you continue to work with attributes, you'll find them to be a powerful tool and a way to link information in your AutoCAD drawing to other applications. You also explored the methods for creating dynamic blocks that change as required to match your drawing's needs. Finally, you created a table to display the door schedule information and added a formula to calculate the total cost.
Blocks and attributes are commonly used in title blocks. For more practice using attributes, you can try the following:
3.15.3.167