Table of Contents

Method SetBlockTableRecord

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

SetBlockTableRecord(int, int, DxfBlockTableRecord, bool)

Puts a block into a cell, as AutoCAD's SetBlockTableRecordId(row, column, blockId, autoFit): a text cell made a block cell (171 of 2), its text, value and field taken out (ResetValue(int, int)), its block (340), its scale (144, 1), the count of its attributes (179) and, for each attribute definition of the block that is not constant, the definition (331) and the value the cell gives it (300, the definition's own text), put before the value as AutoCAD 2021 writes them; a block cell given another block takes the new one's attributes in place of the old one's, its scale and turn kept. The cell is fitted to its block (the flag 174) where autoFit asks. The cell's content in the TABLECONTENT, where the table has one, is emptied as ResetValue(int, int) empties a block cell. The block AutoCAD drew the table with is not drawn anew.

public void SetBlockTableRecord(int row, int column, DxfBlockTableRecord block, bool autoFit)

Parameters

row int

The row, from nought.

column int

The column, from nought.

block DxfBlockTableRecord

The block, one of the table's drawing.

autoFit bool

Whether the block is fitted to the cell.

Exceptions

ArgumentNullException

Thrown when the block is null.

ArgumentOutOfRangeException

Thrown when the cell is not one of the table's.

ArgumentException

Thrown when the block is not one of the table's drawing, or a layout.

InvalidOperationException

Thrown when the table is erased or not in a drawing, or is of a drawing before R2007, whose cell holds its text in groups a block cell has no place for.