Method SetText
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
SetText(CadDocument, string, int, int, string)
Writes the text of a cell, as typing in it does; the same text changes nothing. A number typed, spaces round it left
out, is kept as a number unless the cell is made to hold text, as AutoCAD 2021 reads a text it parses into a value
(ConvertTextToValue): 1 is the whole number 1 and 007 the whole number 7, so that the autofill grip dragged
from it counts 2, 3, 4; 1.5 a number shown in the drawing's units, 1.5000 at LUPREC 4, 1e3 one shown 1.0000E+03 and
1/2 one shown 1/2, each standing top right where the cell has no alignment of its own; 1,5 the point (1, 5, 0)
shown 1.0000, 5.0000, 0.0000; and a number typed in a cell of a number keeps the cell's kind and format, 12 over
1.25 shown 12.0000. A date or a time, in the order of the culture of the machine, is a date as AutoCAD 2021 reads it:
1/2/2020 or 12:30 of a cell of no kind, shown 1/2/2020 or 12:30:00 PM (the formats %x, %X and %c
for a date, a time and both), and any other words over a cell of a date are refused. b1 and 12mm stay text.
public static CadEditResult SetText(CadDocument document, string handle, int row, int column, string text)
Parameters
documentCadDocumentThe document.
handlestringThe table's handle.
rowintThe row, from nought.
columnintThe column, from nought.
textstringThe text, with its MTEXT codes; empty to clear the cell.
Returns
- CadEditResult
What came of it.