Glossary · CAD and BIM
What is a DXF File? Meaning, Example and How It Works
In simple words
DXF (Drawing Exchange Format, also Drawing Interchange Format) is a CAD file format from Autodesk made for exchanging drawings between AutoCAD and other programs. Its specification is published by Autodesk, and the common form is a plain text (ASCII) file.
DXF was introduced with early AutoCAD so that other programs could read and write drawings. AutoCAD can save DXF in ASCII (text) or binary form; the text form is the one most programs exchange.
How it works
A DXF file is a long list of pairs. Each pair is a group code on one line and its value on the next. The group code says what the value means: 0 starts a new object, 8 is the layer name, 10, 20 and 30 are the X, Y and Z of the first point, and 11, 21 and 31 the X, Y and Z of the second point. Because the meaning travels with every value, any program that knows the codes can rebuild the drawing.
Sections of a DXF file
- HEADER: drawing settings such as units and limits.
- CLASSES: information about application-defined classes.
- TABLES: layers, linetypes, text styles, views and other named tables.
- BLOCKS: the definitions of every block used in the drawing.
- ENTITIES: the drawing objects themselves, including block references.
- OBJECTS: non-graphical data such as dictionaries and layouts.
Worked example: reading one line
The ENTITIES section contains this line object:
From the codes, the line runs from (0, 0, 0) to (4000, 3000, 0) on layer A-WALL and is coloured red. Its length can be worked out from the codes alone:
- Change in X: 4000 − 0 = 4000
- Change in Y: 3000 − 0 = 3000
- Length: √(4000² + 3000²) = √(16,000,000 + 9,000,000) = √25,000,000 = 5,000
In a drawing set in millimetres, that is a wall line 5,000 mm (5.00 m) long. The DXF does not say "millimetres" next to the number; the unit comes from the header setting or from what the sender tells you.
Where DXF is used
Laser cutters, CNC routers and plasma cutters, GIS software, older CAD programs and many web and engineering tools import DXF even when they cannot read DWG. It is also handy for scripts: because the text form is readable, a short program can pull every line on one layer out of a DXF file.
Step by step: making a DXF for another program
- Clean the drawing: delete construction lines, PURGE unused items and explode objects the receiver cannot read (ask first).
- Run SAVEAS (or DXFOUT) and pick the DXF version the receiver supports; older versions are read by more programs.
- Choose ASCII unless the receiver asks for binary.
- Tell the receiver the drawing units.
- Open the DXF in the receiving program, or a viewer, and check a known dimension.
Common mistakes
- Expecting every AutoCAD feature to survive: complex objects may arrive as simple lines or not at all.
- Wrong units after import, so the part is cut 25.4 or 1,000 times the right size.
- Choosing a DXF version newer than the receiving program understands.
- Very large files: a text DXF is usually much bigger than the same DWG.
- Splines, text and hatches the machine cannot use; many cutters want only lines, arcs and closed polylines.
Related terms
- CAD and BIMGlossary term
DWG file
DWG is the native drawing file format of AutoCAD. It stores 2D and 3D geometry, layers, blocks, text, dimensions, layouts and drawing information. It is owned by Autodesk and is one of the most widely used formats for sharing CAD drawings.1 min read · Added 20 Nov 2026 - CAD and BIMGlossary term
Layer (AutoCAD)
A layer in AutoCAD is a named group for objects of the same kind, such as walls, doors or text. Each layer sets default colour, linetype and lineweight, and can be turned off, frozen or locked.2 min read · Added 20 Nov 2026 - CAD and BIMGlossary term
Block (AutoCAD)
A block in AutoCAD is one or more objects combined into one named object, such as a door or a title block. The definition is stored once; every copy you place points to it, so editing the definition updates all copies.2 min read · Added 20 Nov 2026
Frequently asked questions
How do I make a DXF in AutoCAD?
Use SAVEAS and choose a DXF file type (or DXFOUT).
Is DXF open?
Its specification is published by Autodesk, so other programs can read and write it.