You are here: Popular FormatsAutodesk AutoCAD DWG/DXF Reader/WriterBackground and AutoCAD Entity Types and Descriptions

Background and AutoCAD Entity Types and Descriptions

There are two formats used by AutoCAD: DXF (drawing exchange format) files, which are large; and ASCII representations of the binary DWG (drawing) files. Logically, both files are identical and, therefore, FME treats both file types in the same manner.

For AutoCAD DWF reading and writing support, please see the Autodesk AutoCAD DWF Reader/Writer

AutoCAD files consist of sections, as follows:

  • HEADER: This contains settings of variables associated with the drawing.
  • CLASSES: This contains class definitions associated with the drawing.
  • TABLES: This contains a variety of tables, including:
  1. Layers: Each layer entry contains layer definition information such as layer color, layer name, and layer linetype. The AutoCAD reader validates the layer names and may modify them to remove invalid characters.
  2. Linetypes: Each linetype entry contains the linetype definition information such as name and alignment. The AutoCAD writer enables linetype definitions to be copied from an existing AutoCAD file, then referenced by name during the data translation.
  3. Shape Files: Each shape file entry identifies a shape file referenced by the drawing. Shape files are used by AutoCAD as a different method for defining symbols or fonts. Note: These are similar to the TextStyles in AutoCAD.

Note: AutoCAD shape files are not the same thing as Esri Shapefiles. AutoCAD shape files store symbol and font definitions.

  1. Applications: Each application entry contains the name of an application referenced within the AutoCAD file.
  • BLOCKS: These are used to define symbols and other drawing file objects used repeatedly throughout a drawing. The AutoCAD writer enables copying of block definitions from an existing AutoCAD file, which is then referenced by name during a data translation operation.
  • ENTITIES: This is the main section of a drawing file and contains the actual feature entities. Each entity contains standard information, such as its color, layer, linestyle, and geometry, as well as a number of attributes specific to its entity type. For example, all 2D entities have thickness, while a text entity has fields for font, size, and the text string in addition to the standard display attributes.

FME supports both 2D and 3D AutoCAD entities. However, many applications only support 2D DWG and DXF files. The 2DForcer transformer can be used to ensure that only 2D data is written to an output DWG or DXF file.

OBJECTS: This section stores dictionaries and other helper non-entity objects.

Each entity may also have associated attribution stored within an extended entity data section. FME supports reading and writing of extended entity data.

Each entity may also have associated attribution stored within XRecord objects in an extension dictionary section. FME supports reading and writing XRecord data from entities.

All coordinates within a drawing file are stored as 64-bit floating point values in world coordinates. As such, there is no need to scale or otherwise alter coordinates as they are being read from or written to a drawing file.

AutoCAD Entity Types and Descriptions

The AutoCAD reader and writer use symbolic names for the different entity types stored within a drawing file. This simplifies feature type specification.

The following table gives a brief description of each of the different AutoCAD entity types currently supported by the reader and/or writer. The entities are described in detail in subsequent sections.

FME autocad_entity

Description

autocad_line

Linear features stored within drawing file as a line or unclosed polyline.

autocad_point

Point features.

autocad_xline

Linear features of type xline.

autocad_ellipse

Features with an elliptical or circular representation.

autocad_shape

Features whose representation is stored in an AutoCAD shape file.

autocad_polygon

Features whose geometry is represented by a closed polyline.

autocad_face

Features represented by a 3D face object. The face object may have 3 or 4 coordinates.

autocad_arc

Features whose geometry represents a portion of a circular arc.

autocad_trace

Features with a 4 coordinate trace geometry.

autocad_solid

Features with a 3 or 4 coordinate solid geometry.

autocad_ray

Features with a linear geometry which represents a ray.

autocad_text

Text features.

autocad_spline

Spline features.

autocad_multi_text

Text features that store multiple lines of text. R14 and later only.

autocad_multi_line

A linear feature that is represented by two or more parallel lines.

Note: R14 and later only. This is supported only by the Reader.

autocad_insert

Point features that represent the location of a block reference entity.

autocad_leader

AutoCAD Leader entity representing leader lines in drawings.

autocad_hatch

Features with 2D boundary loops which form polygons and donuts, and which may be filled with line patterns or color gradients.

autocad_mpolygon

Features with 2D polyline loops which form polygons and donuts and which may be filled with line patterns or color gradients.

autocad_surface

Features with connected and unconnected planar and non-planar 3D areas that may represent meshes or the boundary representations of 3D solids.

autocad_solid3d

Features with connected and unconnected 3D geometries that may be 3D solids or their closed boundary representations.

autocad_attr_def Features without geometry that contain information about AutoCAD attribute definition. Main information on features would be the Tag, Prompt and Default value for that attribute definition.
autocad_dimension Features of various dimension types which contain an aggregation of geometries such as text, lines, arcs or points.
autocad_dimension_def

Features without geometry that contain information about AutoCAD dimension entities. These represent the original attribution of dimensions which have had their geometry resolved into separate features.

autocad_multi_leader AutoCAD Multi-Leader entity representing multiple leader lines in drawings.
autocad_raster Rectangular features that contain raster information.
autocad_xref Features with point geometry that represent the locations of reference entities which are associated with External References.
autocad_info Features without geometry that contain information about certain AutoCAD System Variables stored within the drawing.
autocad_viewport Rectangular features that represent a viewport within a paper space.