Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

DXF (.dxf)


    MIME types: image/vnd.dxf, image/x-dxf
    AutoCAD DXF format.
    3D geometry format.
    Commonly used for the exchange of CAD data.
    Plain text ASCII or binary format.
    DXF is an acronym derived from Drawing Exchange Format.
    Stores a 3D object as a collection of line and polygon primitives and their properties.
    Introduced in 1982.

Import and ExportImport and Export

  • Import["file.dxf"] imports a DXF file as a MeshRegion object representing the surface.
  • Import["file.dxf",elem] imports the specified element from a DXF file.
  • The import format can be specified with Import["file","DXF"] or Import["file",{"DXF",elem,}].
  • Export["file.dxf",expr] exports a 3D mesh-based geometric region to a DXF file. The expr can be any region that is ConstantRegionQ or a Graphics or Graphics3D object.
  • The export format can be specified with Export["file",expr,"DXF"] or Export["file",expr,{"DXF", opt1->val1,}].
  • See the reference pages for full general information on Import and Export.
  • ImportString and ExportString support the DXF format.


  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties and settings
    "Summary"summary of properties
    "CoordinateTransform"transformation function from DXF format
  • Data format representation elements:
  • "LineData"list of line elements in indexed form
    "PointData"list of point elements in indexed form
    "PolygonData"list of polygon elements in indexed form
    "VertexColors"list of vertex colors
    "VertexData"list of vertex coordinates
  • Geometry representation elements:
  • boundary mesh representation of a solid
    mesh representation of a surface
  • Graphics representation elements:
  • "Graphics3D"DXF file represented as a Graphics3D object
    "GraphicsComplex"DXF file as a GraphicsComplex object
    "LineObjects"list of line primitives in absolute coordinates
    "PointObjects"list of point primitives in absolute coordinates
    "PolygonObjects"list of polygon primitives in absolute coordinates
  • Import and Export use the element by default for DXF files.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Import a 3D model from DXF as a MeshRegion object:

Click for copyable input

Summary properties of the solid model:

Click for copyable input

Export a 3D model to a DXF file:

Click for copyable input

Print the raw textual contents of the file:

Click for copyable input
Introduced in 2000
| Updated in 2016