Template:Short description Template:More citations needed Template:Infobox file format
AutoCAD DXF (Drawing Interchange Format, or Drawing Exchange Format) is a computer-aided design (CAD) data file format developed by Autodesk<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> to enable CAD data exchange and interoperability between AutoCAD on different computing platforms.<ref name=":0"/>
HistoryEdit
DXF was introduced in December 1982 as part of AutoCAD 1.0, and was intended to provide an exact representation of the data in the AutoCAD native file format, DWG (Drawing). For many years, Autodesk did not publish specifications, making correct creation of DXF files difficult. Autodesk now publishes the incomplete<ref name=":0">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> DXF specifications online.
CompatibilityEdit
Versions of AutoCAD from Release 10 (October 1988) and up support both American Standard Code for Information Interchange (ASCII) and binary forms of DXF.<ref>Template:Cite book</ref>Template:Rp Earlier versions support only ASCII.
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.
DXF files do not directly specify the units of measurement used for its coordinates and dimensions. DXF files have a HEADER section where a $INSUNITS variable may specify the intended unit (e.g., 1 for inches, 4 for millimeters). However, not all DXF files contain this information, and some software ignores it.
Most CAD systems and many vector graphics packages support the import and export of DXF files, notably Adobe products, Inkscape, and Blender. Some CAD systems use DXF as their native format, notably QCAD and LibreCAD.
File structureEdit
ASCII versions of DXF can be read with any text editor. The basic organization of a DXF file is as follows:<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
- <syntaxhighlight lang="text" class="" style="" inline="1">HEADER</syntaxhighlight> section
- General information about the drawing. Each parameter has a variable name and an associated value.
- <syntaxhighlight lang="text" class="" style="" inline="1">CLASSES</syntaxhighlight> section
- Holds the information for application-defined classes whose instances appear in the <syntaxhighlight lang="text" class="" style="" inline="1">BLOCKS</syntaxhighlight>, <syntaxhighlight lang="text" class="" style="" inline="1">ENTITIES</syntaxhighlight>, and <syntaxhighlight lang="text" class="" style="" inline="1">OBJECTS</syntaxhighlight> sections of the database. Generally does not provide sufficient information to allow interoperability with other programs.
- <syntaxhighlight lang="text" class="" style="" inline="1">TABLES</syntaxhighlight> section
- This section contains definitions of named items.
- Application ID (<syntaxhighlight lang="text" class="" style="" inline="1">APPID</syntaxhighlight>) table
- Block Record (<syntaxhighlight lang="text" class="" style="" inline="1">BLOCK_RECORD</syntaxhighlight>) table
- Dimension Style (<syntaxhighlight lang="text" class="" style="" inline="1">DIMSTYLE</syntaxhighlight>) table
- Layer (<syntaxhighlight lang="text" class="" style="" inline="1">LAYER</syntaxhighlight>) table
- Linetype (<syntaxhighlight lang="text" class="" style="" inline="1">LTYPE</syntaxhighlight>) table
- Text style (<syntaxhighlight lang="text" class="" style="" inline="1">STYLE</syntaxhighlight>) table
- User Coordinate System (<syntaxhighlight lang="text" class="" style="" inline="1">UCS</syntaxhighlight>) table
- View (<syntaxhighlight lang="text" class="" style="" inline="1">VIEW</syntaxhighlight>) table
- Viewport configuration (<syntaxhighlight lang="text" class="" style="" inline="1">VPORT</syntaxhighlight>) table
- <syntaxhighlight lang="text" class="" style="" inline="1">BLOCKS</syntaxhighlight> section
- This section contains Block Definition entities describing the entities comprising each Block in the drawing.
- <syntaxhighlight lang="text" class="" style="" inline="1">ENTITIES</syntaxhighlight> section
- This section contains the drawing entities, including any Block References.
- <syntaxhighlight lang="text" class="" style="" inline="1">OBJECTS</syntaxhighlight> section
- Contains the data that apply to nongraphical objects, used by AutoLISP, and ObjectARX applications.
- <syntaxhighlight lang="text" class="" style="" inline="1">THUMBNAILIMAGE</syntaxhighlight> section
- Contains the preview image for the DXF file.
- <syntaxhighlight lang="text" class="" style="" inline="1">END OF FILE</syntaxhighlight>
The data format of a DXF is called a "tagged data" format, which "means that each data element in the file is preceded by an integer number that is called a group code. A group code's value indicates what type of data element follows. This value also indicates the meaning of a data element for a given object (or record) type. Virtually all user-specified information in a drawing file can be represented in DXF format."<ref>"Chapter 1 -- DXF Format" Autodesk.com</ref>
CriticismEdit
Because comprehensive documentation does not exist,<ref name=":0"/> consideration is often given to alternative open file formats such as Scalable Vector Graphics (SVG, defined by the World Wide Web Consortium (W3C)), Design Web Format (DWF, defined by Autodesk<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>), or even Encapsulated PostScript (EPS, International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC) standard 29112:2018). DXF (and DWG) is still a preferred format for CAD files for use by the ISO.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
ReferencesEdit
External linksEdit
- AutoCAD DXF Reference (from Release 14, 1998) (PDF version from 2012)
- AutoCAD DXF File Format Summary.
- Annotated example DXF file Template:Webarchive
- AutoDesk Online DXF File Viewer.
Template:Graphics file formats Template:AutoCAD related articles Template:CAD software Template:Autodesk products Template:Authority control