Table of Contents

Method InsertBlock

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

InsertBlock(CadDocument, string, int, int, string, double, bool, double, DxfCellAlignment?)

Puts a block into a cell, as the Insert a Block in a Table Cell dialog does: the cell a block cell of the block, fitted to the cell (AutoFit) or at the scale given, turned, and its content aligned as given, one undo step. A block cell given another block keeps its scale and turn unless the dialog asks again.

public static CadEditResult InsertBlock(CadDocument document, string handle, int row, int column, string blockName, double scale, bool autoFit, double rotation, DxfCellAlignment? alignment)

Parameters

document CadDocument

The document.

handle string

The table's handle.

row int

The row, from nought.

column int

The column, from nought.

blockName string

The name of a block of the drawing.

scale double

The scale, above nought; not used where the block is fitted.

autoFit bool

Whether the block is fitted to the cell.

rotation double

The turn, in degrees.

alignment DxfCellAlignment?

Where the block stands in the cell; null to keep what the cell has.

Returns

CadEditResult

What came of it; refused where the block is none of the drawing's, or a drawing before R2007 holds no block cell, or the cell is locked.