AutoCAD .DXF File Description

AutoCAD .DXF files are ASCII files (i.e., they can be edited with a text editor or word processor) or binary files (cannot be edited) containing records indicating graphical entities and their attributes. They provide a medium of exchange with AutoDesk's AutoCAD program. The format of .DXF files is complex and a detailed discussion is beyond the scope of a Help file. Many books describing the .DXF file format are widely available.

Graphics

Graphical information may be stored in the AutoCAD Drawing Exchange Format (.DXF). Many programs, including AutoDesk's AutoCAD (Computer Aided Design) program can import .DXF files, allowing one to display and/or further manipulate the images.  Grapher supports MTEXT (multi-line text block) background color in .DXF import filter.

3DSOLID is a proprietary format, and 3DSOLID entities are not supported in Grapher. If the .DXF file contains 3DSOLID objects, the 3DSOLID objects will be omitted from the import.

Data

AutoCAD .DXF files can contain point data that includes X, Y, and Z data. DXF files can be opened in a worksheet or used for creating plots. When the DXF file is opened in the worksheet, the X and Y coordinates are displayed in columns A and B. If the DXF file contains Z values, the Z values are displayed in column C. If no Z value is included, column C contains a zero (0).

ASCII or Binary Format

.DXF files can be stored in either ASCII or Binary format. ASCII .DXF files are the most versatile, since they can be displayed, edited, printed and transported to non-IBM machines (such as mainframes, minicomputers or Macintosh). However, they are somewhat bigger and take longer to read back into another application.

Table and Entities Sections

.DXF files have two important sections.

  • The Tables section contains definitions of the various line styles and other attributes.

  • The Entities section contains specific information about each graphical entity (line, polygon, etc.) including coordinates and references to the attributes in the defined in the Tables section. All exported graphical entities are assigned to a layer named GSLAYER.

Text

Text can be imported and exported in .DXF files.

Text can be exported as AutoCAD text entities (All text as areas unchecked). No matter what typeface is specified in the application document, all text entities are assigned AutoCAD's STANDARD font. Once inside AutoCAD, the text entities can be edited in the normal AutoCAD fashion. As long as there is no shear or perspective, .DXF text entities will be sized and oriented similar to the text objects in the application document. Shear occurs when the character glyphs are not perpendicular to the text baseline. Perspective occurs when the height of glyphs in the text string are not all the same, as in a 3D view where the glyphs are smaller the farther they are from the observer.

Line Styles

Lines styles are exported with equivalent AutoCAD-compatible line types. The document's internal line styles are assigned the following AutoCAD line type names:

Document

AutoCAD

Solid

CONTINUOUS

Internal Dash

GSDASHED

Internal Dot

GSDOTTED

Internal Dash-Dot

GSDASHDOT

Internal Dash-Dot-Dot

GSDASHDOTDOT

Custom line styles in the document are assigned AutoCAD line type names of the form GSCUSTOM0, GSCUSTOM1, GSCUSTOM2, etc.

Color Numbers

Indexed .DXF color numbers are assigned to each entity. Color numbers (1,2,3,…,255) are indices into AutoCAD’s internal color table. By convention, the first 7 color numbers are guaranteed to have known colors assigned to them by AutoCAD. They are:

1

Red

2

Yellow

3

Green

4

Cyan

5

Magenta

7

Black (Default for GSLAYER)

AutoCAD has a default association of colors to color numbers, but the AutoCAD user is free to change the colors associated with color numbers 8 through 255. When exporting to .DXF format, the color number of the color from the default AutoCAD color table closest to the actual color of the object is assigned to the entity in the .DXF file. Unless you use only the seven colors listed above, the color of objects inside AutoCAD may be different than those in the application document.

AutoCAD 2004 and later versions support true colors. When user chooses AutoCAD 2004 or AutoCAD 2007 or later in the Export Options dialog, true colors are written to the export file.

Import Options

See AutoCAD .DXF Import Options Dialog

Import Automation Options

See AutoCAD .DXF Import Automation Options

Export Options

See AutoCAD .DXF Export Options Dialog

Export Automation Options

See AutoCAD .DXF Export Automation Options

See Also

File Format Chart

AutoCAD .DXF Import Automation Options

AutoCAD .DXF Import Options Dialog

AutoCAD .DXF Export Options Dialog

AutoCAD .DXF Export Automation Options