|Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact|
|Full name||AutoCAD Drawing Interchange File (DXF), ASCII Family|
DXF is an exchange format for content of AutoCAD Drawing Files (DWG). A DXF_ASCII file is an ASCII text file; a binary version of DXF has also been defined, but is less widely used and not described separately in this resource. The DXF format specification is maintained and has been openly published by AutoDesk. The documentation was first released in 1982, and has been updated frequently as the AutoCAD product has been enhanced. The DXF Reference documentation is available through AutoCAD Help and DXF References on the AutoDesk Developer Network has links to documentation, mainly as PDF files, back to 1994 (Release 12).
As of November 2016, PRONOM has identified 19 chronological versions. See File type signifiers below. The compilers of this resource have chosen to describe the DXF ASCII format variants in a single document for the format family. The simple tagged structure of the format has not changed, but the set of codes that identify the entries in the file has been extended over time. See Notes below, for more information about the chronological versions of the AutoCAD application and associated versions of the DXF format.
The structure of a DXF file is a sequence of "groups," each of which occupies two lines in the plain text DXF file. The first line of a group is a group code, which is an integer, usually a positive integer, with zero and small negative integers having special significance. The second line of the group is the group value, in a format which depends on the group code. A simple, but unofficial, introduction to the DXF format, including a graphic of an annotated sample file is at DXF File Specification, from Scan2CAD. Each group code is associated with a data type (e.g., integer, text string, floating point) for its values. See Group Code Value Types Reference (DXF). For the semantics associated with each group code, see DXF Group Codes in Numerical Order Reference. In a few cases the semantics are relatively specific; for example, the value associated with group code 10 is the X-coordinate of a "Primary point; this is the start point of a line or text entity, center of a circle, and so on." Group codes 20 and 30 are used for the Y- and Z-coordinates. In other cases, a group code is associated with a generic function; for example, group codes 290-299 are used for boolean flags.
Groups (of two lines each) in a DXF file are organized into sections. Each section starts with a group with code 0 and value "SECTION", which is usually followed by a group with code 2 and a string value that identifies the section. Sections end with a group with code 0 and value "ENDSEC". Within sections there may be sub-sections (and sub-sub-sections) that are introduced by a group with code 0 and text value indicating the type of information following. See an outline example of an OBJECTS section in a DXF file at Object Group Codes in DXF Files.
The sections defined for a DXF file are:
See also the Description for DWG_Family.
|Production phase||Primarily a middle-state format used to transfer design details among parties engaged in designing, building, and maintaining buildings, aircraft, ships, etc., including architects, builders, engineers, and component suppliers.|
|Relationship to other formats|
|Other||DWG_Family, DWG (AutoCAD Drawing) Format Family. See Notes in the description for DWG_Family on the relationship between DXF and DWG formats.|
|LC experience or existing holdings|
|LC preference||The Library of Congress Recommended Formats Statement (RFS) lists the AutoCAD Drawing Interchange Format (DXF) as a preferred format for 2D and 3D Computer Aided Design vector images.|
The DXF format is a proprietary, but openly documented, format developed and maintained by AutoDesk. The documentation is published under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
The current specification for DXF is integrated into the Help system for AutoCAD and related AutoDesk products. As of 2022, this information is found by navigating through a cluster of web pages from one of two starting points: About the DXF Format | AutoCAD 2022 and About ASCII DXF Files | AutoCAD 2022. See DXF References on the AutoDesk Developer Network for documentation, mainly as PDF documents, back to Release 12 in 1994. Descriptions of two yet earlier versions, Releases 10 and 12, are available at 3D Geometry Specifications, a resource compiled in the 1990s by Martin Reddy.
The DXF format has been very widely used for exchange of design data between CAD applications, the purpose for which it was developed. The plain text representation has been popular, since it is easily used with generic programming tools.
However, it appears that in some CAD/CAM contexts, its use may be less common than in the past, because CAD applications now incorporate much more information and functionality than reproducing paper drawings and 2D renderings of 3D models. For example, the Wikipedia article for the DXF format states, "As AutoCAD has become more powerful, supporting more complex object types, DXF has become less useful. Certain object types, including ACIS solids and regions, are not documented. Other object types, including AutoCAD 2006's dynamic blocks, and all of the objects specific to the vertical market versions of AutoCAD, are partially documented, but not well enough to allow other developers to support them. For these reasons many CAD applications use the DWG format which can be licensed from Autodesk or non-natively from the Open Design Alliance." [Note: This paragraph may have been based on Integrating Advanced Computer-Aided Design, Manufacturing, and Numerical Control: Principles and Implementations (Xu, 2009), page 39]. In addition to the growing importance of 3D solids in CAD in general, in the domain of architecture, the integration of building information modeling (BIM) data into CAD applications has become increasingly important. The compilers of this resource have found no evidence that BIM data can be incorporated into a DXF file in a standard way; rather a separate file format family is used for such data, known as Industry Foundation Classes (IFC). See also IFC-SPF for a description of the "clear text" variant of IFC. Comments welcome.
The UK's Archaeology Data Service has a Guide to Good Practice, last revised in 2011. Section 3.2 for CAD Data Formats highlights problems with losing data in conversion from DWG to DXF and states, "Given the problems of incompatibilities between different file formats, and even incompatibilities between the same file format from the same manufacturer, it is recommended that CAD files are saved in the latest possible version of .dwg and .dxf, and that this is fully documented."
|Licensing and patents||
As a plain text format, the DXF format can be opened and viewed with very basic text editing tools. However, because most of the data elements are indicated by numerical codes rather than human-readable element names and the documentation for some substructures is minimal, the semantics of the drawing content in a DXF file is not easy to understand.
The DXF Reference documentation does not identify any data elements that constitute descriptive contextual information for the drawing except for a project name (variable $PROJECTNAME in the Header section).
None beyond software that can read and interpret the DXF file format.
|Technical protection considerations||
The DXF Reference documentation does not mention encryption. However, in order to protect intellectual property, it is quite likely that DXF files are often transmitted in encrypted form, using generic encryption tools that can be applied to any file.
|Normal rendering||Good support.|
|Clarity (high image resolution)||Scalable.|
|Color maintenance||Color specification in DWG and DXF is by indexed palettes or True Color (RGB color space, 24-bit depth).|
|Support for vector graphics, including graphic effects and typography||Excellent support for vector graphics. More than 60 types of geometric objects are defined, as well as grouping of objects as Blocks or in Layers.|
|Support for multispectral bands||Not applicable.|
|Functionality beyond normal rendering||
Limited support for 3D models as well as 2D drawings. Support for multiple viewports and geospatial positioning.
|Support for CAD/CAM/CAE||
Excellent support for 2D drawings. Support for some 3D model types. AutoCAD's native method for 3D modeling is based on a polymesh construct that uses 3D FACEs. ACIS solids can also be embedded in a DXF file.
According to Wikipedia's Comparison of Computer-aided Design Editors, AutoCAD supports BIM (Building Information Modelling) and IFC (Industry Foundation Classes) for some "verticals." However, it is unclear to the compilers of this resource whether BIM data beyond that presented in drawings would ever be stored in a DXF file. Comments welcome.
|Internet Media Type||image/vnd.dxf
||See registration correspondence at IANA.|
|Indicator for profile, level, version, etc.||See note.||The name of the version of the AutoCAD "drawing database" version is embedded in the DXF header as the value of a "variable" with name $ACADVER. See Notes below for a list of valid values for $ACADVER.|
||See http://www.nationalarchives.gov.uk/PRONOM/fmt/63. The PUID fmt/63 is assigned to ASCII DXF (Generic). As of May 2022, PRONOM had also assigned 20 PUIDs to different chronological versions of the DXF format, the most recent being fmt/1389 for the 2018/2019/2020 version of the format.|
|Wikidata Title ID||Q691652
Although the plain text version of DXF is universally described as ASCII, use of UTF-8 is apparently permitted in recent versions. See DXF File Encoding, available through Internet Archive, which states, "Starting with DXF version R2007 (AC1021) the drawing files are saved with UTF-8 encoding." Length limits for strings may apply to counts of bytes, not characters.
A chronology of AutoCAD software releases is at AutoCAD Release History. The DXF_ASCII format was introduced with AutoCad 1.0, released in December 1982. The Wikipedia article for the DXF format states, "Versions of AutoCAD from Release 10 (October 1988) and up support both ASCII and binary forms of DXF." AutoCAD version codes, which are also used to identify chronological versions of the DXF file format, are listed in the DXF Reference documentation as:
The Wikipedia article for the DWG format lists codes back through AutoCAD 1.0.