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.
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.
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:
The Table Style dialog box appears.
For example, select the default table style named Standard.
The Create New Table Style dialog box appears.
The New Table Style dialog box appears, as shown in Figure 13-8.
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.
The Table Style dialog box reappears.
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.
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.)
After you create a suitable table style, adding a table to your drawing is easy with the TABLE command. Here's how:
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.”)
The Insert Table dialog box appears.
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.
AutoCAD prompts you to specify the insertion point of the table.
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.
AutoCAD draws the table based on the table size you indicated and chooses the column width and number of rows.
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).
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.
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.
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 EditCopy. 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.
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.