New Commands in AutoCAD 2005: Part 2
Editing Tables
by Ralph Grabowski
Introduction
Recall from last month that the table is a new object in AutoCAD
2005. It consists of the outline structure of spreadsheet-like tables
with rows, columns, and headers. (Unlike real spreadsheets, tables in
AutoCAD don't perform calculations.)
This month, we look at editing tables. There are two parts of tables
that can be edited: the table structure (the rows and columns)
and the table content (the text and blocks). Both kinds of
editing can be done without commands!
• To edit the table structure, click on a border line between
rows or columns. This action selects the entire table; grips appear,
which can be used to change the size of the table, rows, and columns.
• Alternatively, select the table, and then right-click. AutoCAD
displays a shortcut menu with commands suitable for editing tables.
• To edit the table contents, double-click inside a cell to display
the Text Formatting bar (mtext editor).
• To edit the table properties, double-click a cell border line
to display the Properties window.
In addition to editing tables without commands, AutoCAD provides commands
that edit the content and properties of tables:
TablEdit - edits the content of selected cells.
TableStyle - creates styles that define the look of
the table, much like text styles (covered next month).
Properties - changes the properties of tables and cells,
overriding the style.
MatchCell - copies the properties of one cell, and
applies them to other cells (covered next month).
MatchProp - copies the properties of the table, and
applies them to other tables (covered next month).
Finding the Commands
To edit the table structure, select the entire table, a group of cells,
or a single cell.
• To select the entire table, click on a border line.
• To select a group of cells, window them.
• To select a single cell, click in it.
Right-click to display the shortcut menu, whose content differs, depending
on what you select.
Right-click Editing the Entire Table
Select the table, and right-click to see the shortcut menu. The commands
specific to tables are shown highlighted in the figure.

Figure 1: Selecting the entire table.
Size Columns Equally makes all columns the same width.
It's not clear to me how AutoCAD decides on the width.
Size Rows Equally makes all rows the same height.
Remove all Property Overrides resets the table back
to its original style, by removing changes you may have applied with
the Properties command.
Export invokes the TableExport command
to export the table as a comma-separated values file, which can be read
into just about any spreadsheet and database program.
Right-click Editing a Range of Cells
Select two or more cells, and right-click to see the shortcut menu.
(TIP: Hold down the Shift key to select
additional cells.) The commands specific to cells are shown highlighted
in the figure.

Figure 2: Selecting a range of cells.
Cell Alignment displays a submenu; changes the justification
of the text inside the cells, such as upper right or centered.
Cell Borders displays the Cell Borders Properties dialog
box; changes the color, lineweight, and visibility of cell border lines.
Match Cell invokes the MatchCell command;
Insert Block invokes the undocumented TInsert
command, which displays the Insert a Block in a Table Cell dialog box;
select a block or drawing for the cell. (TIP: Only
one item can be in a cell: mtext or a single block; if text exists in
the cell, this command replaces it.)
Edit Cell Text invokes the MText command,
which edits the text and its properties.
Insert Columns displays a submenu; adds a column to
the left or right of the selected cells.
Delete Columns removes the selected columns from the
table; use the U command to undo.
Size Columns Equally (described earlier).
Insert Rows displays a submenu; adds a row to above
or below the selected cells.
Delete Rows removes the selected rows from the table
without warning.
Size Rows Equally (described earlier).
Remove all Property Overrides (described earlier).
Delete Cell Contents removes the text or block from
the cell. (If text was replaced by a block, the text reappears with
this command.)
Merge Cells displays a submenu; combines all selected
cells into a single cell, or all cells in a row or column.
Unmerge Cells (available only if cells have been merged)
undoes the cell merging.
Double-click Editing a Cell
Double-click inside a cell and AutoCAD invokes the MText
command, and displays the Text Formatting bar. Notice that the cell
is highlighted in gray. Press Enter to move to another
cell.

Figure 3: Editing the text in a cell.
Editing Table Properties
Double-click any border line of a table, and AutoCAD invokes the Properties
command, and displays the Properties window. In addition to changing
properties common to all objects (color, layer, and so on), you can
change the following properties specific to tables:
[table-e-4.gif] Figure 4: Editing the properties of a table.
Table Style selects from predefined styles created
by the TableStyle command; click the ... button to
create new styles.
Direction is up or down from the tables insertion point.
Changing this also change the location of the table header row.
Table Width is the overall width of the table. Changing
this value increases (or decreases) the width of columns proportionately.
You are limited, however, to narrowing the width of the table to that
which accommodates the cell content.
Table Height is the overall height of the table. Changing
this value increases (or decreases) the height of rows proportionately.
Vertical Cell Margin is the y-distance between the
border line and the text.
Horizontal Cell Margin is the x-distance between the
border line and the text.
Editing Cell Properties
You can change the properties of selected cells: just click inside a
cell, and the content of the Properties window changes.

Figure 5: Editing the properties of a cell.
Cell Width specifies the width (from left border to
right border) in current units.
Cell Height specifies the height in current units.
Alignment is the justification of text inside the cell.
Background fill selects a color with
which to flood the cell's background.
Border lineweight changes the thickness of the border
lines.
Border color changes the color of the border lines.
Both display the Cell Border Properties dialog box.
Grips Editing Tables and Cells
When you select a table, grips appears (the blue squares). You can use
these to change the size of the table, its rows, and its columns --
depending on which grip you use.

Figure 6: Editing tables and cells with grips
To grips-edit the table, select one of the grips numbered in the figure:
• Grip #1 enlarges and reduces the entire table.
• Grip #2 widens and narrows all columns.
• Grip #3 increases and decreases the height of all rows.
• Grip #4 enlarges and/or reduces the entire table, depending
on how you move the cursor.
The other grips widen and narrow individual columns.
To grips-edit the cell(s):
• Grips on vertical borders change the width of the cell(s).
• Grips on horizontal borders change the height of the cell(s).
Next month, we look at the final set of command related to tables:
TableStyle, MatchCell, MatchProp,
and TablExport.
|