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
documentCadDocumentThe document.
handlestringThe table's handle.
rowintThe row, from nought.
columnintThe column, from nought.
blockNamestringThe name of a block of the drawing.
scaledoubleThe scale, above nought; not used where the block is fitted.
autoFitboolWhether the block is fitted to the cell.
rotationdoubleThe turn, in degrees.
alignmentDxfCellAlignment?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.