DXF
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
Dxf Preview.
At a glance
| Original creator | Autodesk |
| First published | 1982 |
| Purpose | A tagged text format for exchanging the content of AutoCAD drawings with other CAD applications. |
| Extensions | .dxf |
| Poka parser | poka-dxf |
| Viewer | none: the parser draws its own preview |
| Depth tier | Standalone parser (see Depth tiers) |
| Breadth tier | B3 Core (see Breadth tiers) |
Preview a sample
These are sample files, not yours. Poka opens a sample in your browser: the file is read and parsed on your device and nothing is uploaded.
How much Poka reads
B3 Core. Only the main content type or types are decoded (for example geometry but not materials, layers or annotations, or only one version family). The list of gaps is substantial.
Confidence: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-20: poka-dxf over the dxf 0.6.1 crate (read from the cargo registry); the corpus tests were run over all 32 corpus DXF files (versions R12, R14, R2000, R2004, R2007, R2010, R2013, R2018) and every one opens: the eleven VectorCraft files that failed with 100/AcDbLayout not expected are read through poka_dxf::load, which retries without the group codes the crate has no type for. Bulges are flattened with the same rule poka-dwg uses, checked against the corpus' rounded corners, and the extrusion (OCS) transform is unit-tested. HATCH is drawn from the boundary paths read out of its raw group codes (278 boundary paths over 14 corpus files), and DIMENSION from the anonymous block its group 2 names (8 dimensions in two corpus files, checked against the LINEs those blocks hold). Covers ASCII and binary DXF alike (binary: artcraft-cadcraft-dxf-13 and -14 draw 3 and 300 entities). The B2 versus B3 line is judgement.
What Poka does not read
- Extrusion (OCS) on INSERTs and on arcs, circles, ellipses and text: an INSERT's block orientation cannot be shown by the 2D viewer, and a down-facing extrusion (0,0,-1) is left unmirrored, as poka-dwg does
- HATCH is drawn as its boundary outlines only: the fill and a patterned hatch's pattern are not drawn (the viewer has no fill kind), and an elliptical-arc or spline boundary edge is skipped and counted in the file information
- WIPEOUT, IMAGE, HELIX, 3DFACE, MESH and 3DSOLID are not drawn (ASCII files list them under Not drawn)
- ATTRIB values of block references (DWG draws them)
- SPLINE is drawn through fit points, else the control polygon (which does not lie on the curve); knots and weights are not evaluated
- Linetypes, lineweights, text styles and layer on/off or frozen state
- True-colour entity colours (group 420) are dropped: the proto's colour field is an ACI index and the viewer maps it through the ACI palette, so this needs a proto and a viewer change, not only this parser
- Circles and arcs under non-uniform block scale use the X scale only
- Paper-space entities are not separated by the paper-space flag (untested)
- Binary DXF gets no Not drawn list
Background
The Library of Congress says the documentation first appeared in 1982 and that the ASCII form came with AutoCAD 1.0 in December 1982. The tagged structure stayed stable while the set of group codes grew; the version shows in the header as $ACADVER. Poka draws lines, arcs, circles, polylines, inserted blocks, flattened splines, leaders and multileaders, and lists the entity kinds it cannot draw as "Not drawn" in the file-information panel. Polyline bulges are drawn as their arcs (LWPOLYLINE and 2D POLYLINE alike), and an entity's extrusion direction is applied to the kinds it defines as 2D coordinates (lines, polylines, solids and points). HATCH is drawn as its boundary outlines, without the fill or pattern (the viewer has no fill kind); an elliptical-arc or spline boundary edge is not drawn, and that is reported in the file information. DIMENSION is drawn from the anonymous block its group 2 names (*D1 …), which holds the dimension geometry as AutoCAD generated it.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| DXF, ASCII | Partly read | Parsed with the dxf crate; the version string from the header is shown in the file facts (parsers/poka-dxf/src/lib.rs). All 32 corpus files open; the VectorCraft ones carry a group code the crate has no type for, and poka_dxf::load drops such pairs only when the plain read fails. | |
| DXF, binary | AutoCAD Binary DXF |
Partly read | The code recognises the signature and draws the same entity set as for ASCII, with no Not-drawn list and no dedicated binary test (parsers/poka-dxf/src/raw.rs). |
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- dxf (used; MIT; Rust)
- dxf-rs (candidate; MIT; Rust; https://github.com/ixmilia/dxf-rs)
- ezdxf (candidate; MIT; Python; https://github.com/mozman/ezdxf)
- ACadSharp (candidate; MIT; C#; https://github.com/DomCR/ACadSharp)
- acadrust (candidate; MPL-2.0; Rust; https://github.com/hakanaktt/acadrust) — MPL-2.0 is file-level copyleft; wasm use needs a deny.toml exception
Software that uses it
- Autodesk AutoCAD
- Bricsys BricsCAD
- GstarCAD
- Profil Koordynator
Sources
- https://loc.gov/preservation/digital/formats/fdd/fdd000446.shtml
- parsers/poka-dxf/src/lib.rs
- parsers/poka-dxf/src/raw.rs