CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT | CAD ESHOP - CZ | SK | EN | DE
Over 1.077.000 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.

CAD tip CAD tip # 8640:

Question

CAD 
 %  platform  category 
A
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.

CodeFunction
\LStart underline
\lStop underline
\OStart overstrike
\oStop overstrike
\KStart strike-through
\kStop strike-through
\NNew column
\PNew paragraph (new line)
\pi \pxi \pxt \pxqControl codes for bullets, numbered paragraphs, tab stops and columns - e.g. bullets: \pxi-3,l3,t3;, tab stops: \pxt10,t12; (l=left offset, t=tab spacing), justification: \pxql;=left, \pxqr;=right, \pxqc;=center, \pxqj;=block-justified, \pxqd;=distributed

example:

  • \pxi2,l0.8,r3.2,b0.3948,a0.2616,se0.492;=indent first 2 lines of the paragraph from left/right, spacing before and after the paragraph, line spacing exactly (e) or multiples of (m) the given value (values always in inches)
\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:
    A
    B
  • e.g. \SX/Y:
    X
    Y
  • e.g. \S1#4:
    ¼
\AAlignment
  • \A0; = bottom
  • \A1; = center
  • \A2; = top
\CColor change (ACI colors)
  • \C1; = red
  • \C2; = yellow
  • \C3; = green
  • \C4; = cyan
  • \C5; = blue
  • \C6; = magenta
  • \C7; = white

You can also use \c and a combination of ACI color index and truecolor long code or color book (see color converter) - like this:

  • \C113;\c10601021; = greenish
\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.

ACADLT
100% *CAD
21.5.2012    105275×   FAQ  
Prices - CAD eShop:
applies to: AutoCAD · AutoCAD LT ·

See also:
Tip 14163:How to select DWG texts containing a certain number of characters?
Tip 14063:How to get week day and week number from a given date.
Tip 13971:What do geolocation codes like 8FWPXFCF+82 or 33UVQ61402434 mean?
Tip 13737:Formatting leading zeros in AutoCAD fields (and automatic field update).
Tip 13712:Why do I have an inactive "thousands separator" item in AutoCAD text field formatting?


Back   All CAD Tips



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
  



Featuring:
Extend your AutoCAD LT productivity with our popular add-on
CADstudio LT Extension More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist