CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
Cesky English Deutsch
 Visitors: 6247 

CAD tip CAD tip # 8640:

Question CAD 
 %  platform  category 
Q - question

Text formatting codes in MText objects.

A - answer Paragraph texts in AutoCAD can contain control codes which influence appearance of the text. These formatting control codes are automatically inserted in the internal MText editor. But if you edit your texts with an alternative editor (e.g. Notepad), or if you generate them programmatically, you can use these codes to format your paragraph texts.

\LStart underline
\lStop underline
\OStart overstrike
\oStop overstrike
\KStart strike-through
\kStop strike-through
\NNew column
\PNew paragraph (new line)
\pi \pxi \pxtControl codes for bullets, numbered paragraphs, tab stops and columns - e.g. bullets: \pxi-3,l3,t3;, tab stops: \pxt10,t12;
\XParagraph wrap on the dimension line (only in dimensions)
\QSlanting (obliquing) text by angle - e.g. \Q30;
\HText height - e.g. \H3x;
\WText width - e.g. \W0.8x;
\FFont selection
  • e.g. \Fgdt;o - GDT-tolerance
  • e.g. \Fkroeger|b0|i0|c238|p10 - font Kroeger, non-bold, non-italic, codepage 238, pitch 10
\SStacking, fractions
  • e.g. \SA^B:
  • e.g. \SX/Y:
  • e.g. \S1#4:
  • \A0; = bottom
  • \A1; = center
  • \A2; = top
\CColor change
  • \C1; = red
  • \C2; = yellow
  • \C3; = green
  • \C4; = cyan
  • \C5; = blue
  • \C6; = magenta
  • \C7; = white
\TTracking, char.spacing - e.g. \T2;
\~Non-wrapping space, hard space
{}Braces - define the text area influenced by the code
\Escape character - e.g. \\ = "\", \{ = "{"

Codes and braces can be nested up to 8 levels deep. Formatting codes can be removed via the context menu in the MText editor.

100% *  CAD 
21.5.2012    56372×   FAQ  
Comments   Tell a friend
applies to: AutoCAD · AutoCAD LT ·

See also:
Tip 11788:Invalid number or bad continuation - when creating a linetype.
Tip 11751:toMulti converts polylines to multi-lines driven by a definition table.
Tip 11289:Adding, multiplying and rounding numbers inside DWG drawing texts - NumInText.
Tip 11223:Copy multiple DWG drawing texts to the Windows Clipboard.
Tip 10889:How to get user's full domain name, phone No., department, e-mail...

Back   All CAD Tips All CAD tips&tricks

Setting scale for documentation views in AutoCAD. « | » GIS performance analysis in Autodesk Infrastructure Map Server.

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info

Please use these tips at your own risk.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.