Property Contents
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
Contents
Gets or sets the words of the MTEXT with their formatting (groups 3 and 1), as AutoCAD's Contents: as the file
writes them, \P a new paragraph, {\H1.5x;Big} letters half as high again, but each escape of four
digits read as the letter it stands for before the formatting, as AutoCAD 2021 reads it in a file of any version:
a\U+0110b gives aĐb, \U+D83D\U+DE00 the letter beyond U+FFFF of those two halves, \U+0041 an A,
\U+0110 a backslash and Đ, and \U+005CP the code of a new paragraph. \U+0000 and an escape of
fewer digits are kept as written. A caret and the character after it are read first, as AutoCAD reads them:
a^Jb gives a, a line feed and b, a^ b gives a^b, and a^@b ends at a. Empty where the record
gives none. Before R2018 an MTEXT whose later columns are MTEXTs of their own holds only the words of its first:
those of the others are in their MTEXTs, as AutoCAD and ezdxf keep them.
public string Contents { get; set; }
Property Value
- string
Set, words with their formatting codes, with no line break: written in pieces of 250 characters, the last in group 1, a piece not ending between a caret and the character it goes with, nor between the two halves of a letter beyond U+FFFF, a caret written ^ and a space and a tab ^I, as AutoCAD writes them, so that
\S1^2;is written\S1^ 2;andm^2reads back as m^2. In a file of R2007 or later every letter is written as it is but one beyond U+FFFF, written as the escapes of its two halves, as AutoCAD 2021 opens no DXF that holds its four bytes of UTF-8; in an older one a letter the file's code page lacks is written as its escape, as AutoCAD writes it. Each reads back as the letter. The words it has, as they are written or as they read, a line break read from an escape among them, change nothing.
Exceptions
- ArgumentNullException
Thrown when the words set are null.
- ArgumentException
Thrown when the words set have a line break in them: a new paragraph is
\P.- InvalidOperationException
Thrown when the MTEXT is erased.