The following group codes apply to mtext entities. In addition to the group codes described here, see Common Group Codes for Entities. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference.

Mtext group codes

Group code



Subclass marker (AcDbMText)


Insertion point

DXF: X value; APP: 3D point

20, 30

DXF: Y and Z values of insertion point


Nominal (initial) text height


Reference rectangle width


Attachment point:

1 = Top left; 2 = Top center; 3 = Top right

4 = Middle left; 5 = Middle center; 6 =Middle right

7 = Bottom left; 8 = Bottom center; 9 =Bottom right


Drawing direction:

1 = Left to right

3 = Top to bottom

5 = By style (the flow direction is inherited from the associated text style)


Text string. If the text string is less than 250 characters, all characters appear in group 1. If the text string is greater than 250 characters, the string is divided into 250-character chunks, which appear in one or more group 3 codes. If group 3 codes are used, the last group is a group 1 and has fewer than 250 characters


Additional text (always in 250-character chunks) (optional)


Text style name (STANDARD if not provided) (optional)


Extrusion direction (optional; default = 0, 0, 1)

DXF: X value; APP: 3D vector

220, 230

DXF: Y and Z values of extrusion direction (optional)


X-axis direction vector (in WCS)

DXF: X value; APP: 3D vector

A group code 50 (rotation angle in radians) passed as DXF input is converted to the equivalent direction vector (if both a code 50 and codes 11, 21, 31 are passed, the last one wins). This is provided as a convenience for conversions from text objects

21, 31

DXF: Y and Z values of X-axis direction vector (in WCS)


Horizontal width of the characters that make up the mtext entity. This value will always be equal to or less than the value of group code 41 (read-only, ignored if supplied)


Vertical height of the mtext entity (read-only, ignored if supplied)


Rotation angle in radians


Mtext line spacing style (optional):

1 = At least (taller characters will override)

2 = Exact (taller characters will not override)


Mtext line spacing factor (optional):

Percentage of default (3-on-5) line spacing to be applied. Valid values range from 0.25 to 4.00


Background fill setting:

0 = Background fill off

1 = Use background fill color

2 = Use drawing window color as background fill color


Background color (if color index number)

420 - 429

Background color (if RGB color)

430 - 439

Background color (if color name)


Fill box scale (optional):

Determines how much border there is around the text.


Background fill color (optional):

Color to use for background fill when group code 90 is 1.


Transparency of background fill color (not implemented)


Column type
76 Column count
78 Column Flow Reversed
79 Column Autoheight
48 Column width
49 Column gutter
50 Column heights; this code is followed by a column count (Int16), and then the number of column heights

Xdata with the "DCO15" application ID may follow an mtext entity. This contains information related to the dbConnect feature.