Text Entities

autocad_entity: autocad_text

Features with autocad_entity set to autocad_text are stored in and read from drawing files as text entities. A text entity is represented by a single coordinate and the following attributes.

Attribute Name

Contents

autocad_text_string

The text string.

Range: char[1024]

Default: No default

autocad_original_text_string

The contents of a text entity including the character codes used to define its style and formatting.

When reading, this is converted into autocad_text_string.

To set the contents of a text entity when writing, the value of this attribute is used in preference to autocad_text_string.

Range: char[1024]

Default: No default

autocad_rotation

The rotation of the text for an entity.

Range: -360.0..360.0

Default: 0

Reprojectable: Yes

autocad_original_rotation

The rotation of the text of an entity before a potential transformation, such as a User Coordinate System, is applied by the AutoCAD reader. This value is used preferentially to set the text rotation when writing a text entity.

Range: -360.0..360.0

Default: 0

autocad_true_type_font

The name of the TrueType font used to display the text string.

For text entities, this attribute is only used by the AutoCAD writer, since single-line text entities do not have support for TrueType fonts.

If this attribute is specified on an autocad_text feature, a multiline text entity will be created and written instead of a single-line text entity.

Default: No default

autocad_text_size

The text height.

Range: 64-bit floating point number > 0

Default: 10

Reprojectable: Yes

autocad_original_text_size

The text height of an entity before a potential transformation, such as a User Coordinate System, is applied by the AutoCAD reader.

This value is used preferentially to set the text size when writing a text entity.

Range: 64-bit floating point number > 0

Default: 10

autocad_width_factor

The scaling applied in the x direction which makes the text wider or narrower. However, this doesn’t affect the weight (i.e., boldness) of the text string.

Range: 64-bit floating point number > 0 and <= 10000

Default: 1

autocad_oblique

The oblique angle of the text, which causes the entity to lean to the right or left of vertical, where positive numbers indicate to the right.

For convenience, the AutoCAD reader and writer will treat the range of values from 275.0..360.0, as an alternative specification of the range from -85.0..0.

Range: -85.0 ..85.0

Default: 0

autocad_alignment_x

autocad_alignment_y

autocad_alignment_z

The alignment coordinate of the text. This location is used in conjunction with the justification and the feature location to place the text correctly. This is primarily of use when performing an AutoCAD-to-AutoCAD translation.

To override the justification of source AutoCAD dataset, you need to remove these alignment attributes from the feature and then set the autocad_justfication attribute. This is because when performing an AutoCAD-to-AutoCAD translation, these alignment attributes override the autocad_justification attribute.

Note that if autocad_justification is set to autocad_baseline_left for this text, then the alignment point attributes will match the text entity location.

Range: Any 64-bit floating point value

Default: x, y, and z value of text alignment point

Reprojectable: Yes

autocad_font_bold

Indicates whether the TrueType font related to the text style has bold formatting.

Range: Yes | No

Default: No

autocad_font_charset

The Windows TrueType font character set identifier for the related text style.

  • UndefinedCharset = -1
  • AnsiCharset = 0
  • UnicodeCharset = 1
  • SymbolCharset = 2
  • JapaneseCharset = 128
  • KoreanCharset = 129
  • ChineseSimpCharset = 134
  • ChineseTradCharset = 136
  • JohabCharset = 130
  • HebrewCharset = 177
  • ArabicCharset = 178
  • GreekCharset = 161
  • TurkishCharset = 162
  • VietnameseCharset = 163
  • ThaiCharset = 222
  • EastEuropeCharset = 238
  • RussianCharset = 204
  • BalticCharset = 186
  • INTERNALCHARSET = 256

Range: Integer, as above

Default: 0

autocad_font_italic

Indicates whether the TrueType font related to the text style has italic formatting.

Range: Yes | No

Default: No

autocad_font_pitch_family

The Windows font pitch and family identifier for the related text style.

Not for RealDWG.

Range: Integer

Default: 0

autocad_font_pitch

The Windows font pitch identifier for the related text style.

RealDWG only.

Range: default | fixed | variable

Default: default

autocad_font_family

The Windows font family identifier for the related text style.

RealDWG only.

Range: roman | swiss | modern | script | decorative | do_not_care

Range: do_not_care

autocad_font_typeface

The Windows TrueType font character set identifier for the related text style.

Range: char[50]

Default: No default

autocad_big_fontname

The name of the file which contains fonts for large character sets.

Range: char[65]

Default: No default

autocad_shape_name

The name of the shape which contains the text font definition.

Range: char[33]

Default: STANDARD

autocad_shape_filename

The name of the file which contains the text font1AutoCAD shape files should not be confused with Esri shapefiles. AutoCAD shape files hold font and symbol definitions; Esri shapefiles hold spatial features. definition.

Range: char[65];

Default: txt

autocad_shape_rotation

The angle for the text as defined in shape file.

Range: 64-bit floating point number

Default: 0

autocad_shape_height

The height of the text as defined in shape file.

Range: 64-bit floating point number

Default: 0

autocad_shape_width

The width of the text as defined in shape file.

Range: 64-bit floating point number

Default: 1

autocad_shape_vertical

Indicates if the shape text, as defined in the shape file, is vertical or horizontal.

Range: yes | no

Default: None

autocad_generation

The generation of the text entry.

Range:

autocad_normal | autocad_upside_down | autocad_backwards | autocad_upsidedown_backwards


Default: autocad_normal

autocad_justification

The justification of the text relative to its insert point.

Range:

autocad_top_left |
autocad_top_center |
autocad_top_right |
autocad_top_middle |
autocad_top_aligned |
autocad_top_fit |
autocad_middle_left |
autocad_middle_center |
autocad_middle_right |
autocad_middle_middle |
autocad_middle_aligned |
autocad_middle_fit |
autocad_bottom_left |
autocad_bottom_center |
autocad_bottom_right |
autocad_bottom_middle |
autocad_bottom_aligned |
autocad_bottom_fit |
autocad_baseline_left |
autocad_baseline_center |
autocad_baseline_right |
autocad_baseline_middle |
autocad_baseline_aligned |
autocad_baseline_fit

Default: autocad_baseline_left

autocad_tracking_
percent

The tracking percent.

Only used by the Reader.

This attribute will only exist if reading a graphical text entity.

Default: not applicable, since this is a Reader-only attribute.

autocad_backwards

Indicates whether the text is backwards. Only used by the Reader. This attribute will only exist if reading a graphical text entity.

Default: not applicable since this is a Reader-only attribute.

autocad_upside_down

Indicates if the text is upside down. Used only by the Reader. This attribute will only exist if reading a graphical text entity.

Default: not applicable, since this is a Reader-only attribute.

autocad_vertical

Indicates if the text is vertical.

Used only by the Reader.

This attribute will only exist if reading a graphical text entity.

Default: not applicable, since this is a Reader-only attribute.

autocad_underlined

Indicates if the text is underlined.

Used only be the Reader.

This attribute will only exist if reading a graphical text entity.

Default: not applicable, since this is a Reader-only attribute.

autocad_overlined

Indicates if the text is overlined.

Used only by the Reader.

This attribute will exist only if reading a graphical text entity.

Default: not applicable, since this is a Reader-only attribute.