Table of Contents

Method SetDataFormat

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

SetDataFormat(CadDocument, string, DxfCellRange, DxfDataType, DxfUnitType, string)

Gives the cells of a range a kind of data and a format, as the Data Format dialog does: the kind (a number, a whole number, words) and its unit (a length, an angle, money, a percentage), then the format, as %lu2%pr2%ps[$,]%th44 for money of two places with a dollar sign and commas; the values kept, shown anew. One undo step.

public static CadEditResult SetDataFormat(CadDocument document, string handle, DxfCellRange range, DxfDataType kind, DxfUnitType unit, string format)

Parameters

document CadDocument

The document.

handle string

The table's handle.

range DxfCellRange

The cells.

kind DxfDataType

The kind: Double, Long, String; a date or a point keeps its kind and takes the format alone.

unit DxfUnitType

The unit of the kind.

format string

The format; empty for none.

Returns

CadEditResult

What came of it; refused where a cell is locked in its format or holds a block.