Table of Contents

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 (txt where 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 \P as \par, \X as \line, a column \N as \column, the braces of a group as RTF's, \~, \\, \{ and \} as themselves, the line under and through (\L, \l, \K, \k) as \ul, \ulnone, \strike and \strike0, a font \F or \f as \f of its entry, with \b and \i where a TrueType font gives them, a colour \C of AutoCAD's index as \cf of its red, green and blue, BYLAYER and BYBLOCK the automatic colour, a tab ^I as \tab, a line feed ^J as \line, a letter's escape \U+00E9 and 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 MTEXT B-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.