Gather Round the Tables

You don't know the meaning of the word tedious unless you've tried to create a column-and-row data table in older versions of AutoCAD using the LINE and TEXT commands. AutoCAD's table object and the TABLESTYLE and TABLE commands for creating it make the job almost fun.

image Table objects in AutoCAD 2012 are not annotative, so you have just two methods of adding them to drawings: You can create them in model space, scaling them up by the drawing scale factor (see Chapter 4 for a refresher), or — and this seems more sensible to me — you can create them in a layout, in paper space, defining them by their actual plotted (paper) dimensions.

Tables have style, too

You control the appearance of tables — both the text and the gridlines — with table styles (just as you control the appearance of standalone text with text styles). Use the TABLESTYLE command to create and modify table styles. Follow these steps to create a table:

  1. imageOn the Home tab, click the Annotation panel's label to open its slideout and then choose Table Style.

    The Table Style dialog box appears.

  2. In the Styles list, select the existing table style whose settings you want to use as the starting point for the settings of your new style.

    For example, select the default table style named Standard.

  3. Click the New button to create a new table style that's a copy of the existing style.

    The Create New Table Style dialog box appears.

  4. Enter a New Style Name and click Continue.

    The New Table Style dialog box appears, as shown in Figure 13-8.

    image

    Figure 13-8: Setting the table.

  5. In the Cell Styles area, with Data showing in the list box, specify settings for the data alignment, margins, text, and borders.

    The settings you're likely to want to change are Text Style, Text Height, and perhaps either Text Color (all three are on the Text tab) or Grid Color (on the Borders tab). If you leave colors set to ByBlock, the text and grid lines will inherit the color that's current when you create the table. That color will be the current layer's color, if you follow my advice in Chapter 6.

  6. In the Cell Styles area, open the drop-down list and repeat Step 5 for the Headers (that is, the column headings) and the Title.
  7. Click OK to close the New Table Style dialog box.

    The Table Style dialog box reappears.

  8. Click Close.

    Your new table style becomes the current table style that AutoCAD uses for future tables in this drawing, and the Table Style dialog box closes. Now you're ready to create a table, as described in the next section.

image You can access the Manage Cell Styles dialog box directly from the Cell Styles drop-down list of the New Table Style dialog box. The Table Cell Format (on the General tab, Format row, click the ellipsis button) dialog box provides a number of additional options for formatting cells by data type.

AutoCAD stores table styles in the DWG file, so a style that you create in one drawing isn't immediately available in others. You can copy a table style from one drawing to another with DesignCenter. (Use the procedure for copying layers between drawings outlined in Chapter 6, but substitute Tablestyles for Layers.)

Creating and editing tables

After you create a suitable table style, adding a table to your drawing is easy with the TABLE command. Here's how:

  1. Set an appropriate layer current.

    Assuming that you leave the current color, linetype, and lineweight set to ByLayer, as I recommend in Chapter 6, the current layer's properties will control the properties of any parts of the table that you left set to ByBlock when you defined the table style. (See Step 5 in the preceding section, “Tables have style, too.”)

  2. imageOn the Home tab's Annotation panel, choose Table.

    The Insert Table dialog box appears.

  3. Choose a table style from the Table Style drop-down list.
  4. Choose an Insertion Behavior:
    • Specify Insertion Point: The easiest method. You pick the location of the table's upper-left corner (or lower-left corner if you set Table Direction to Up in the table style). When you use this method, you specify the default column width and number of rows in the Insert Table dialog box.
    • Specify Window: You pick the upper-left corner and then the lower-right corner. When you use this method, AutoCAD automatically scales the column widths and determines how many rows to include.
  5. Specify Column & Row Settings.

    If you chose Specify Window in Step 4, AutoCAD sets the Column Width and number of Data Rows to Auto, which means that AutoCAD will figure them out, basing those values on the overall size of the table that you specify in Steps 7 and 8.

  6. Click OK.

    AutoCAD prompts you to specify the insertion point of the table.

  7. Click a point or type coordinates.

    If you chose Specify Insertion Point in Step 4, AutoCAD draws the table grid lines, places the cursor in the title cell, and displays the Text Editor tab on the Ribbon.

  8. If you chose Specify Window in Step 4, specify the diagonally opposite corner of the table.

    AutoCAD draws the table based on the table size you indicated and chooses the column width and number of rows.

  9. Type a title for the table.
  10. Type values in each cell, using the arrow keys or Tab key to move among cells.

    The cell right-click menu offers many other options, including copying contents from one cell to another, merging cells, inserting rows and columns, changing formatting, and inserting a block (that is, a graphical symbol — see Chapter 17 for information about blocks).

    image The fields feature described earlier in this chapter works for table text, too — you can insert a field into a table cell. For example, you might use this feature to create part of a title block, with fields serving as the “date” and “drawn by” data.

  11. Click Close Text Editor on the Ribbon (or click OK on the Text Formatting toolbar).

    Figure 13-9 shows a completed table, along with the Insert Table dialog box.

You can edit cell values later, simply by double-clicking in a cell. To change column width or row height, click the table grid and then click and move the blue grips. (To change the width of one column without altering the overall width of the table, hold down the Ctrl key while you move the grip.) If you want to change other aspects of a table or individual cells in it, select the table or cell and use the Quick Properties palette or the Properties palette to make changes.

image

Figure 13-9: The Insert Table dialog box and one result of using it.

image You can import tables from Microsoft Excel instead of using the Insert Table dialog box. To import Excel data, in Excel, select the desired cells and choose EditimageCopy. Then in AutoCAD, choose Paste Special from the Home tab's Clipboard panel (it's on the Paste drop-down button) and then choose AutoCAD Entities in the Paste Special dialog box. AutoCAD attempts to copy the Excel spreadsheet's formatting along with the cell data, but you'll probably have to adjust column widths and perform other cleanup chores on the imported table.

You can go the other direction — from AutoCAD to Excel or another program — via a CSV (Comma Separated Value) file. Look up TABLEEXPORT command in AutoCAD's online help.

image You can extract attribute data to tables. See Chapter 17 for information about blocks and attributes. You can also perform simple calculations in tables by using predefined functions or your own arithmetical expressions. Look up Use Formulas in Table Cells in AutoCAD's online help.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset