Adding Tables to Your Drawing


One of the most common text items in a drawing is the table (or schedule as it is often called in architectural drawings). Tables are often used for lists of parts that include specifications and part numbers, as shown in Figure 9.15. Tables provide vital information about a design that cannot be conveyed through drawings alone.

image from book
Figure 9.15: A sample schedule created with the Table tool

Frequently, tables are generated in a spreadsheet since the tabular format of spreadsheets fits with the table format. The AutoCAD table feature gives you an easy way to include tables with your drawing, either by creating them directly in AutoCAD or by importing them from spreadsheet files.

Creating a Table

Before you create your table, you need to know the number of rows and columns you'll want. Don't worry if you're not certain of the exact number; you can add or subtract them at any time. For practice, you can create a table that contains four rows and five columns.

Start by creating the basic table layout:

  1. Click Table from the Text control panel or choose Draw è Table to open the Insert Table dialog box (see Figure 9.16).

  2. In the Column & Row Settings group, enter 4 for Columns and 5 for Data Rows.

  3. Click OK. The dialog box closes, and you see the outline of a table follow your cursor.

  4. Position the table in the center of your drawing area, and click to place the table. The table appears with a cursor in the top cell. You also see the Text Formatting toolbar above the table.

  5. Enter a title for your table, and then press . Notice that the cursor moves to the next cell.

  6. Click OK to exit the Text Formatting toolbar.

image from book
Figure 9.16: The Insert Table dialog box

Once you're finished, you'll have a table with two additional rows besides the five data rows you indicated in step 2-the title row at the top, which has only one column, and a row for the column heads.

Adding Cell Text

Once you have the table in place, you can easily add text to the individual cells. Just click inside a cell to open the Text Formatting toolbar (see Figure 9.17). A text cursor appears inside the cell, allowing you to type the text you want. The Text Formatting toolbar lets you format the text.

image from book
Figure 9.17: A table cell ready for editing with the Text Formatting toolbar above the table

Combining Cells

In formatting your table, you might want to merge adjacent cells to create larger cells for headings or for other purposes. Here are the steps to follow to merge cells:

  1. Click the first cell you want to merge. The Table toolbar appears (see Figure 9.18).

  2. Shift+click the cell at the other end of the group of cells you want to merge (see Figure 9.19). The group of cells is selected.

  3. Right-click the selected cells, and then choose Merge Cells è All. The selected cells merge into a single cell. You can also click the Merge Cell tool in the Table toolbar.

image from book
Figure 9.18: The Table toolbar appears when you click a table cell. This toolbar offers typical spreadsheet tools for formatting cells or adding formulas to cells.

image from book
Figure 9.19: Selecting a group of cells in a table

image from book

You have the option to restrict the merging of cells to rows (choose Merge Cells è By Row) or to columns (choose Merge Cells è By Column) in the shortcut menu in step 3.

You saw how the Table toolbar appears when you click a cell. If you click a cell and then start typing, the Table toolbar is replaced by the Text Formatting toolbar to allow you to make formatting changes to the cell text.

Adjusting Table Cell Text Orientation

You can adjust the orientation of the text in cells to accommodate different table styles. For example, to use space more efficiently, a table frequently has column headings that are oriented vertically. The following exercise shows you how to change the text orientation from horizontal to vertical. Before you start, it will help to have text already placed in the cells you're editing so you can adjust the cell size as you work.

  1. Click the cell to select it.

  2. Shift+click another cell to select a group of cells.

  3. Click the grip at the bottom of the selected group, and move it down. The entire row becomes taller, as shown in the sample in Figure 9.20. This provides room for the text when you rotate it.

  4. Right-click the selected cells, and then choose Properties from the shortcut menu to open the Properties palette.

  5. Click the Text Rotation option in the Content group.

  6. Change the text rotation value to 90 (see Figure 9.21). The text rotates into a vertical orientation.

    With the text in this orientation, the columns are too wide, so you'll want to change the cell width for the selected cells.

  7. With the Properties palette still open, click the Cell Width option near the top of the palette, and then enter an appropriate value for the cell width. You might need to experiment with this value until you get something that looks appropriate. The cells change to their new width.

image from book
Figure 9.20: A group of cells selected and made taller

image from book
Figure 9.21: The Text Rotation option in the Properties palette

You can also adjust the width of multiple cells by adjusting the grip location, as shown in Figure 9.22. For example, instead of changing the cell width value in step 7, you can move the left or right grip of the selected group of cells.

image from book
Figure 9.22: Adjusting the width of a group of cells

Adjusting Table Cell Text Justification

Besides text orientation, you can also change the justification of text within the cells. Here is how to do this:

  1. Select a cell or click a cell, and Shift+click another cell to select a group.

  2. Right-click the selected cells, and choose Cell Alignment è Middle Center. The text is centered in the cells. You can also click the Align cell data arrow in the Table toolbar and select Middle Center from the menu that appears.

    image from book

You can also control the margin between the text and the cell border for the entire table using the Cell Margin options in the Properties palette. Select the entire table, right-click, and choose Properties. In the Properties palette, click the Vertical Cell Margin option or the Horizontal Cell Margin option in the Table group (see Figure 9.23).

image from book
Figure 9.23: The Vertical Cell Margin option in the Properties palette

Adding or Deleting Rows and Columns of Cells

Now suppose you want to delete a row of cells in a table. Here's what to do:

  1. Click a cell in the row you want to delete.

  2. Right-click, and then choose Delete Rows.

To add a row, do the following:

  1. Select a cell adjacent to the location where you want a new row.

  2. Right-click, and choose Rows è Insert Above or Rows è Insert Below, depending on where you want the new row.

You might notice a Columns option in the shortcut menu. The Columns option works in a similar way to the Rows option, letting you insert a column to the left or right of a selected cell.

All of these options are also available on the Table toolbar. See Figure 9.18 for their locations.

Adding Formulas to Cells

One of the greatest benefits of using spreadsheets is that you can apply formulas to the values in a cell. AutoCAD's table feature lets you include formulas in cells so you don't have to rely on an external spreadsheet program when generating tables.

  1. Click the cell where you want to place your formula. The Table toolbar appears.

  2. Drag the downward pointing arrow to the right of the Formula tool in the Table toolbar, and select Sum, as shown in Figure 9.24.

  3. Select the cells that bracket the value you want to add by placing a selection window inside the cells. For example, to get the sum of a the top four cells in Figure 9.25, click inside the first cell A2, and then complete the selection window by clicking in cell B3. The formula appears in cell you selected in step 1 (see Figure 9.26). In addition, the Text Formatting toolbar appears in place of the Table toolbar. This enables you to modify the formula if you need to do so.

  4. Click OK, and you'll see the Sum value in the cell you selected in step 1.

image from book
Figure 9.24: The Formula tool

image from book
Figure 9.25: Selecting a cell range for the Sum function

image from book
Figure 9.26: The cell with the new formula

You'll notice that the cell with the formula shows a gray background. This background indicates that the cell contains a formula, which is actually a special type of text called a field. This background does not print and is there to help differentiate fields from other types of text.

Using Other Math Operations

In the previous example, you saw how you can use the Sum option in the Formula drop-down menu. If you look again at the options in that menu (see Figure 9.24), you'll see the Equation option. If you select that option, you can enter your own formula directly in the cell. The Equation option simply adds the equal sign to the cell before you start typing.

Once you select the Equation option, you can string several cell addresses together to add multiple cells, as follows:

 =A2+A3+A4... 

You can also subtract, multiply, or divide by using the - (subtract or minus), (multiply or asterisk), or / (divide or hash) keys. To perform multiple operations on several cells, you can group operations with parentheses. For example, if you want to add two cells together and then multiply their sum by another cell, you can use the following format:

 =(A2+A3)*A4 

You might have noticed the Average and Count buttons that appear in the Formula drop-down menu. Average gives the average value of a range of cells, and Count returns the number of cells you select. Clicking one of these buttons temporarily closes the Field dialog box, allowing you to select several cells using a selection window. Once you've selected a set of cells, you'll see a formula appear in the Formula box that automatically applies the operation to the selected cells. For example, clicking the Average button produces a formula similar to the following:

 =Average(A1:B5) 

A range of cells is indicated using a colon as in A1:B5. You can use this format when entering formulas manually. You can also include a single cell with a range by using a comma, as follows:

 =Average(A1:B5,C6) 

Adding Formulas Directly to Cells

If you're in a hurry, you can add a formula directly to a cell without using the Formula tool. To do this, double-click the cell, and then when the Text Formatting toolbar appears, enter the formula with the addition of an = (equal sign) at the beginning, as in the following:

 =A2+A3 

The cell automatically converts to a formula field with the appropriate value. The only drawback to this method is that you have to decipher the cell address on your own. If you click a cell, the cell row and column labels appear to help you find the appropriate address.

Editing Formulas

Finally, if you want to change a formula, you can double-click the Formula cell to open the Text Formatting toolbar. You can edit the formula directly in the cell or use the Formula tool to create a new formula.

Exporting Tables

In some situations, you'll want to export your AutoCAD table to a spreadsheet program or a database. You can do this through a somewhat hidden option in a shortcut menu. Take the following steps:

  1. Select the entire table by clicking the table border.

  2. Right-click anywhere outside the table anywhere in the table, and then choose Export from the shortcut menu to open the Export Data dialog box. This is a typical file dialog box.

  3. Specify a name and location for your exported table data, and click Save.

Notice that the file is saved with a .csv filename extension. This is a common spreadsheet file format known as a comma-delimited file and can be read by most spreadsheet programs, including Microsoft Excel. To open the exported file in Excel, choose File è Open to open the Open dialog box, and then select Text File (*.prn, *.txt, *.csv). You can then locate the exported table and open it.

Tables exported to Excel lose their formulas. Formula cells are converted to simple values.

Importing Tables

It's not unusual for a table to be generated in an Excel spreadsheet by someone other than the person drawing plans in AutoCAD. You can easily import Excel spreadsheets into AutoCAD and convert them to AutoCAD tables.

You can import Excel files in two ways: you can copy and paste data directly from Excel to AutoCAD, or you can create a data link. With the cut-and-paste method, you'll get a simple copy of the imported data, but if you use a data link, the imported data is updated whenever the source Excel file changes.

To perform a simple copy-and-paste operation, do the following:

  1. In Excel, select the cells you want to export, and then choose Edit è Copy.

  2. In AutoCAD, choose Edit è Paste Special to open the Paste Special dialog box (see Figure 9.27).

  3. Select AutoCAD Entities from the list box, and then click OK. The imported spreadsheet appears at the cursor.

  4. Click to place the spreadsheet in the drawing.

image from book
Figure 9.27: The Paste Special dialog box

Once the spreadsheet is placed, you can use any of the table-editing methods described in this chapter to adjust its appearance.

If you'd like to import a table that is linked to the source Excel spreadsheet, do the following:

  1. image from book Click the Data Link Manager button in the Tables control panel. The Data Link Manager appears.

    image from book

  2. Click the Create a New Excel Data Link listing in the list box. The Enter Data Link Name dialog box appears.

    image from book

  3. Enter a name for your data link, and then click OK. The New Excel Data Link dialog box appears.

  4. Click the Browse button in the upper-right corner of the dialog box, and browse to the Excel file you want to import. Once you've made your selection, a preview of your table appears in the dialog box.

  5. Click OK at the New Excel Data Link dialog box and again at the Data Link Manager dialog box.

    image from book

  6. image from book Click the Table tool in the Table control panel to open the Insert Table dialog box.

  7. In the Insert Options group, select the From a Data Link radio button, and then select the name of the data link you just created from the drop-down list.

    image from book

  8. Click OK to place the table in your drawing.

Once you've taken these steps, you'll be notified of changes made to the original spreadsheet and will be given the option to update the imported table with the new data in the source spreadsheet.

If the spreadsheet is large, AutoCAD may pause a moment while importing the data in step 5.

Editing Table Line Weights

The text in a table is not the only part that you may want to control. The line work within the table is also important. You can emphasize parts of a table by making the line weight bolder for certain groups of cells, for example.

Before you can see the effects of the line-weight settings for cell borders, you need to turn on the display of line weights. Choose Format è Lineweight, turn on the Display Lineweight setting, and then click OK.

You can control the line weight of cell borders by doing the following:

  1. Select a single cell by clicking it, or select a group of cells by clicking one cell to select it and then Shift+clicking another cell.

  2. Choose Cell Borders from the Table toolbar to open the Cell Border Properties dialog box (see Figure 9.28). You can use this dialog box to fine-tune the appearance of the line work of the table.

    image from book

  3. Click the Lineweight drop-down list, and select a line weight.

  4. Click the Outside Borders button in the Apply to Border Type group to tell AutoCAD to change the outermost borders of the cell or group of cells to the selected line weight (see Figure 9.29).

  5. Click OK to apply the changes to the cell borders (see Figure 9.30).

image from book
Figure 9.28: The Cell Border Properties dialog box

image from book
Figure 9.29: The Outside Borders option in the Cell Border Properties dialog box

image from book
Figure 9.30: A set of cells with their border adjusted to a heavier line weight

The Cell Border Properties dialog box also lets you set the line colors by choosing a color from the Color drop-down list before selecting an Apply To option.

In the example, you use the Outside Borders option. Table 9.4 describes all the border options.

image from book
Table 9.4: The Apply To Options in the Cell Border Properties Dialog Box
Open table as spreadsheet

OPTION

PURPOSE


All Borders

Applies the changes to the borders of all the selected cells

Outside Borders

Applies the changes to only the outside borders of a group of cells

Inside Borders

Applies the changes to only the inside borders of a group of cells

No Borders

Lets you select which border you want to affect by clicking the graphic in the Apply To group

image from book

If you want to select only the vertical or horizontal inside borders, first click the No Borders button, and then click the desired border in the graphic of the Cell Border Properties dialog box. As you click lines in the sample image, they lighten or darken to indicate their selection.

Changing Cell Background Colors

In addition to the table borders, you can change the background color for the cells of the table through the Background Fill option in the Properties palette. Select a group of cells in the table that you want to affect (but don't select the entire table), right-click, and choose Properties to open the Properties palette. Click the Background Fill option in the Cell group.

Adding Graphics to Table Cells

One of the more interesting features of the Table tool is its ability to include blocks in a cell. This can be useful if you want to include graphic elements in your table. Adding a block to a cell is a simple process:

  1. Click a cell to select it.

  2. Click the Insert Block tool in the Table toolbar to open the Insert a Block in a Table Cell dialog box (see Figure 9.31).

  3. Select a block name from the Name drop-down list. You can also click the Browse button to the right of the list to open a file dialog box that allows you to select a drawing file for import to the cell.

  4. Once you've selected a block and specified the settings in the Properties group of the dialog box, click OK. The block appears in the cell you've selected.

image from book
Figure 9.31: The Insert a Block in a Table Cell dialog box

The Properties group in the dialog box allows you to specify the alignment and size of the inserted block. By default, the AutoFit option is turned on. This option adjusts the size of the block to make it fit in the current cell size.

Creating Table Styles

Most users will have a set of table formats they use frequently. Door and window schedules in architectural plans will be fairly similar from project to project, for example.

For this reason, AutoCAD offers custom table styles. You can create a table style that matches some of the formatting you usually use for your projects. Then when you need a table, you can use your custom style and save yourself some table-formatting work.

Table styles allow you to set up the properties of the title, column heads, and data in advance so you don't have to set up those features each time you create a table. When you're ready, you can select your custom table style and specify the number of columns and rows.

To create a table style, take the following steps:

  1. Choose Format è Table Style or enter ts to open the Table Style dialog box. You see the Standard table style in the list box shown in Figure 9.32.

  2. Click New to open the Create New Table Style dialog box, as shown in Figure 9.33. This is where you give your new table style a name.

  3. Enter a name for your table style-for example, My Table Style-and click Continue to open the New Table Style dialog box (see Figure 9.34).

  4. Set up your table style using the options in this dialog box, and then click OK to close the dialog box.

  5. Click Close to exit the Table Style dialog box.

image from book
Figure 9.32: The Table Style dialog box

image from book
Figure 9.33: The Create New Table Style dialog box

image from book
Figure 9.34: The New Table Style dialog box

You'll see that your new table style appears in the Styles list of the Table Style dialog box and in the Table Style drop-down list of the Tables control panel. If you want to edit an existing table style, open the Table Style dialog box again, select the style you want to edit from the list, and click the Modify button. This opens the Modify Table Style dialog box, which allows you to edit the existing style. The Modify Table Style dialog box is identical to the New Table Style dialog box shown in Figure 9.34.

Once you've created a style, you can select it from the Table Style Settings group of the Insert Table dialog box (see Figure 9.35).

image from book
Figure 9.35: The Table Style Settings group in the Insert Table dialog box

You can also get to the New Table Style dialog box by clicking the Launch the Table Styles dialog button just to the right of the Table Style Name drop-down list in the Insert Table dialog box. This opens the Table Styles dialog box. You can then click the New button to open the New Table Style dialog box.

Let's take a closer look at the New Table Style dialog box in Figure 9.34. You saw in step 4 of the previous exercise that the three tabs at the top of the dialog box all contain the same set of options. This dialog box allows you to specify the text-formatting options for each of these three table elements: data, column headers, and title.

The Starting Table group lets you select an existing table as the starting point for your new table style. The General group lets you determine whether the Title and Header rows appear at the top or the bottom of the table.

You can select the table element you want to set up by selecting it from the Cell Styles drop-down list in the upper-right side of the dialog box. As you make changes, the graphic to the left shows how your changes affect your table style.

The Cell Styles group also offers three tabs: General, Text, and Borders. The General tab offers options for the formatting of the type of cell you have selected in the Cell Styles drop-down list. The Text tab lets you set up the text style, angle height, and color of the cell text. The Borders tab lets you control the color and line weight of the table line work. The options in this tab work just like the options in the Cell Border Properties dialog box you saw in an earlier exercise.




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