Table of Contents

Method RecomputeTableBlock

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

RecomputeTableBlock()

Draws the table anew in the anonymous block it is drawn with, as AutoCAD's RecomputeTableBlock: the block's entities erased and, from its cells, the fill of each filled cell (a SOLID), the lines of its grid (a LINE for each run of a line of one look along a row or column of cells, none inside a block of merged cells), the text of each cell (an MTEXT at the cell's attachment point, as wide as the cell less its margins) and the block of each block cell (an INSERT, its extents, turned and scaled, aligned in the cell by its alignment, in from the cell's sides by the margins; the scale of a cell fitted to its block, SetAutoScale(int, int, bool), the one that fits those extents into the cell less its margins: a block 10 by 40 in a cell 30 wide and 8 high is drawn at 0.125; an ATTRIB follows the INSERT for each attribute definition of the block that is not constant, with the value the cell gives it or its own words; a block whose definitions the drawing's fonts measure is aligned by the box of their words in Arial and fitted by the wider of that and the box of the words in the definitions' own fonts), all on layer 0. Each look is the cell's own, else the table's own of its kind of row, else its table style's (DxfTableStyle), else AutoCAD's Standard's. A table that names no block of the drawing, or one another entity names too, is given a block of its own. The table of rows 10, 8 and 8 high and columns 40 and 30 wide, its title merged across, is drawn with 6 lines and 4 texts.

public void RecomputeTableBlock()

Remarks

Rows keep their heights: a text taller than its row is not made room for, as AutoCAD would make its row taller. A table of 100 rows of 20 columns is drawn in some tens of milliseconds.

Exceptions

InvalidOperationException

Thrown when the table is in no drawing, or is erased.