Method SetDataType
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
SetDataType(int, int, DxfDataType, DxfUnitType)
Sets the kind of a cell's value and what its number measures, as AutoCAD's SetDataType(row, col, dataType,
unitType): its value's 90 and 94, from R2007 on, as AutoCAD 2021 turned each value (D33 d1 to d12, t1 to t16).
A whole number becomes the number 7, shown 7.000000, or the text 7; a number the whole number it holds cut towards
nought, 12.7 12 and -12.7 -12, one beyond 32 bits -2147483648, or the text it shows, 12.500000; a text the whole
number it reads, 12 of " 12 " and of 12.25, or the number it reads, shown in the drawing's units and given the
format %lu6 of them, 12.0000 of 12 where LUNITS is 2 and LUPREC 4, or %lu1 of powers of ten for a text
written in them, 1.0000E+03 of 1e3. Each takes away the flag 2 of the value (93 6 made 4) but a text of a whole number
made that number. A value not of the new kind, the text B-12 for a number, becomes a value of none of that kind,
93 7, an empty text, its unit not written; a value of none stays one, its flag 2 taken away (93 5).
AutoCAD refuses no kind; a kind other than a text, a whole number and a number is refused here, the library knowing
no groups for it: the DXF reference does not describe a cell's value. The unit alone is written in place, the value
kept; a unit of several flags, as Angle | AngleNotTransformed (65 538), is written as it is. No flag of the
cell's overrides is set, its 0x40000 among them: the kind is written in its value, and
GetOverrides(int, int, int) gives what it gave. A drawing's units of engineering or fractions are not
written by the library: a text read as a number in them is written as the invariant culture writes it.
public void SetDataType(int row, int col, DxfDataType dataType, DxfUnitType unitType)
Parameters
rowintThe row, from nought.
colintThe column, from nought.
dataTypeDxfDataTypeunitTypeDxfUnitTypeWhat its number measures, made of the flags of DxfUnitType.
Exceptions
- ArgumentOutOfRangeException
Thrown when the cell is not one of the table's, or the unit holds a flag none of DxfUnitType has.
- ArgumentException
Thrown when the kind is not one written.
- InvalidOperationException
Thrown when the cell holds its text alone, as a file before R2007 writes it, or the table is erased.
SetDataType(int, int, int, DxfDataTypeParameter)
Sets the kind of a content of a cell's value with what its number measures, as AutoCAD's SetDataType(row, column,
contentIndex, dataType): of its one content, nought, as SetDataType(int, int, DxfDataType, DxfUnitType).
public void SetDataType(int row, int column, int contentIndex, DxfDataTypeParameter dataType)
Parameters
rowintThe row, from nought.
columnintThe column, from nought.
contentIndexintThe content, nought.
dataTypeDxfDataTypeParameterThe kind and the unit.
Exceptions
- ArgumentOutOfRangeException
Thrown when the cell is not one of the table's, the content is not nought, or the unit holds a flag none of DxfUnitType has.
- ArgumentException
Thrown when the kind is not one written, or the value is not of it.
- InvalidOperationException
Thrown when the cell holds no value, or the table is erased.