Property ContentsRTF
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
ContentsRTF
Gets or sets the words of the MTEXT as RTF, as AutoCAD's ContentsRTF: its Contents written as a
document of RTF and read back from one, as SetContentsRtf(string) reads it.
public string ContentsRTF { get; set; }
Property Value
- string
Get, a document
{\rtf1\ansi\deff0{\fonttbl{\f0 Arial;}}...}whose first font is that of the MTEXT's text style, its typeface, or its font's file where it has none (txtwhere the MTEXT has no style of the drawing), every font the words name after it in the order they name them, a font's file marked so by the ignored group{\*\ghfontfile}of its entry, then a colour table where they have colours, the words, and a paragraph's mark that closes them, as a word processor closes its last paragraph. The codes carried over: a paragraph\Pas\par,\Xas\line, a column\Nas\column, the braces of a group as RTF's,\~,\\,\{and\}as themselves, the line under and through (\L,\l,\K,\k) as\ul,\ulnone,\strikeand\strike0, a font\For\fas\fof its entry, with\band\iwhere a TrueType font gives them, a colour\Cof AutoCAD's index as\cfof its red, green and blue, BYLAYER and BYBLOCK the automatic colour, a tab^Ias\tab, a line feed^Jas\line, a letter's escape\U+00E9and a letter beyond ASCII as\u; the carets are read as Contents reads them, so that^@ends the words. %% and what follows it are kept as written, %%d, %%c, %%% and %%248 among them, as AutoCAD 2021 keeps them. A stack\S1/2;is the text 1/2, as Text reads it. Left out: the heights, widths, slants, tracking and alignments of the letters (\H,\W,\Q,\T,\A), the paragraph's settings (\p), the line over the letters (\O,\o), a true colour (\c) and every other code. The MTEXTB-12\P{\C1;\LM16\l}in the style Standard of the font txt is{\rtf1\ansi\deff0{\fonttbl{\f0{\*\ghfontfile}txt;}}{\colortbl ;\red255\green0\blue0;}B-12\par {\cf1 \ul M16\ulnone }\par}.Set, as SetContentsRtf(string).
Exceptions
- ArgumentNullException
Thrown when the RTF set is null.
- InvalidOperationException
Thrown when the MTEXT is erased.