Page 1 of 1

MText RFT Formatting Codes

PostPosted: Fri Jun 14, 2013 10:33 am
by Mark F. Madura
Mike Smith was asking us about MText formatting and if it was possible to adjust the aspect to create wider text.

Though it's not readily apparent, it is possible to use RTF (Rich Text Formatting) codes to customize the display of individual characters or words in MText entities.

After you've placed the text. Use the MText Entity Properties Editor and select Format RTF... to bring up a text editing dialog.

Enter the formatting codes as shown below to modify text. (I've also attached a sample drawing you can download.)

Note: These same formatting codes are also supported by AutoCAD's MText entity.

Code: Select allCode:       | Purpose:                                              | Example:
-------------------------------------------------------------------------------------------
\0...\o     | Turns overline on/off                                 | {\ODataCAD\o}
\L...\l     | Turns underline on/off                                | {\LDataCAD\l}
\~          | Inserts nonbreaking space                             | {DataCAD\~LT}
\\          | Inserts backslash                                     | {\\DataCAD}
\{...\}     | Inserts opening and closing brace                     | {\{DataCAD\}}
\Cvalue;    | Changes to the specified color                        | {\C2;DataCAD}
\File name; | Changes to the specified font file                    | {\Ftimes; DataCAD}
\Hvalue;    | Changes to the text height in drawing units           | {\H2;DataCAD}
\Hvaluex;   | Changes text height to multiple of current height     | {\H3x;DataCAD}
\S...^...;  | Stacks subsequent text at the \, #, or ^ symbol       | {1.000\S+0.010^-0.000;}
\Tvalue;    | Adjusts the space between characters (.75 to 4 times) | {\T2;DataCAD}
\Qangle;    | Changes obliquing angle                               | {\Q20;DataCAD}
\Wvalue;    | Changes width factor                                  | {\W2;DataCAD}
\Avalue;    | Sets the alignment (0=bottom,1=center, 2=top)         | {\A1;1 \S1/2;}
\P          | Ends paragraph                                        | \PDataCAD

RTF_Editor.png
Select Format RTF... from the MText Entity Properties Dialog.
RTF_Editor.png (29.57 KiB) Viewed 13731 times

RTF.jpg
RTF Formatting Sample Output
RTF.jpg (143.59 KiB) Viewed 13731 times