The HEADER section holds the drawing’s settings. Each variable is a 9
group carrying its name, such as $ACADVER, followed by one or more groups
that carry its value; a point uses 10, 20 and (for 3D) 30. Only variables that are
saved in the drawing appear. This page follows Autodesk’s AutoCAD 2014 DXF Reference,
the newest edition published as a PDF. The AutoCAD 2018 online DXF Reference lists
the same variables and adds one $ACADVER value, AC1032.
0
SECTION
2
HEADER
9
$ACADVER
1
AC1027
9
$INSBASE
10
0.0
20
0.0
30
0.0
9
$INSUNITS
70
4
0
ENDSEC
Header variables
In the reference’s order (alphabetical). Points are in the world coordinate system unless the description says otherwise.
| Variable | Code | Meaning |
|---|---|---|
$ACADMAINTVER | 70 | Maintenance version number (should be ignored) |
$ACADVER | 1 | Drawing database version: AC1006 R10; AC1009 R11 and R12; AC1012 R13; AC1014 R14; AC1015 AutoCAD 2000; AC1018 2004; AC1021 2007; AC1024 2010; AC1027 2013; AC1032 2018 (2018 reference) |
$ANGBASE | 50 | Direction of angle 0 |
$ANGDIR | 70 | 1 clockwise angles; 0 counterclockwise |
$ATTMODE | 70 | Attribute visibility: 0 none, 1 normal, 2 all |
$AUNITS | 70 | Units format for angles |
$AUPREC | 70 | Units precision for angles |
$CECOLOR | 62 | Current entity colour: 0 BYBLOCK, 256 BYLAYER |
$CELTSCALE | 40 | Current entity linetype scale |
$CELTYPE | 6 | Entity linetype name, or BYBLOCK or BYLAYER |
$CELWEIGHT | 370 | Lineweight of new objects |
$CEPSNID | 390 | Plot style handle of new objects, used when $CEPSNTYPE is 3 |
$CEPSNTYPE | 380 | Plot style type of new objects: 0 by layer, 1 by block, 2 by dictionary default, 3 by object ID/handle |
$CHAMFERA | 40 | First chamfer distance |
$CHAMFERB | 40 | Second chamfer distance |
$CHAMFERC | 40 | Chamfer length |
$CHAMFERD | 40 | Chamfer angle |
$CLAYER | 8 | Current layer name |
$CMLJUST | 70 | Current multiline justification: 0 top, 1 middle, 2 bottom |
$CMLSCALE | 40 | Current multiline scale |
$CMLSTYLE | 2 | Current multiline style name |
$CSHADOW | 280 | Shadow mode for a 3D object: 0 casts and receives shadows, 1 casts shadows, 2 receives shadows, 3 ignores shadows |
$DIMADEC | 70 | Number of decimal places shown in angular dimensions |
$DIMALT | 70 | Alternate unit dimensioning performed if nonzero |
$DIMALTD | 70 | Alternate unit decimal places |
$DIMALTF | 40 | Alternate unit scale factor |
$DIMALTRND | 40 | Rounding of alternate units |
$DIMALTTD | 70 | Decimal places of tolerance values in alternate units |
$DIMALTTZ | 70 | Zero suppression for alternate tolerance values (0–3, above) |
$DIMALTU | 70 | Units format for alternate units of every dimension type except angular: 1 scientific, 2 decimal, 3 engineering, 4 architectural (stacked), 5 fractional (stacked), 6 architectural, 7 fractional |
$DIMALTZ | 70 | Zero suppression for alternate unit values (0–3, above) |
$DIMAPOST | 1 | Alternate dimensioning suffix |
$DIMASO | 70 | 1 create associative dimensioning; 0 draw individual entities |
$DIMASSOC | 280 | Associativity of dimensions: 0 exploded (lines, arcs, arrowheads and text drawn as separate objects); 1 non-associative single objects, whose value updates when a definition point moves; 2 associative, with definition points coupled to points on geometry |
$DIMASZ | 40 | Dimension arrow size |
$DIMATFIT | 70 | Placement when text and arrows do not both fit inside the extension lines: 0 both outside, 1 move arrows first then text, 2 move text first then arrows, 3 move whichever fits best. A leader is added to moved text when DIMTMOVE is 1 |
$DIMAUNIT | 70 | Angle format for angular dimensions: 0 decimal degrees, 1 degrees/minutes/seconds, 2 gradians, 3 radians, 4 surveyor’s units |
$DIMAZIN | 70 | Zero suppression for angular dimensions: 0 show all leading and trailing zeros, 1 suppress leading zeros, 2 suppress trailing zeros, 3 suppress both |
$DIMBLK | 1 | Arrow block name |
$DIMBLK1 | 1 | First arrow block name |
$DIMBLK2 | 1 | Second arrow block name |
$DIMCEN | 40 | Size of centre mark or lines |
$DIMCLRD | 70 | Dimension line colour (0 BYBLOCK, 256 BYLAYER) |
$DIMCLRE | 70 | Extension line colour (0 BYBLOCK, 256 BYLAYER) |
$DIMCLRT | 70 | Dimension text colour (0 BYBLOCK, 256 BYLAYER) |
$DIMDEC | 70 | Decimal places for tolerance values of a primary units dimension |
$DIMDLE | 40 | Dimension line extension |
$DIMDLI | 40 | Dimension line increment |
$DIMDSEP | 70 | Single-character decimal separator for decimal dimensions |
$DIMEXE | 40 | Extension line extension |
$DIMEXO | 40 | Extension line offset |
$DIMFAC | 40 | Scale factor for the height of fraction and tolerance text: DIMTXT × DIMTFAC gives that height (listed under this name in the reference) |
$DIMGAP | 40 | Dimension line gap |
$DIMJUST | 70 | Horizontal text position: 0 above the dimension line, centred between extension lines; 1 above, next to the first extension line; 2 above, next to the second; 3 above and centred on the first extension line; 4 above and centred on the second |
$DIMLDRBLK | 1 | Arrow block name for leaders |
$DIMLFAC | 40 | Linear measurements scale factor |
$DIMLIM | 70 | Dimension limits generated if nonzero |
$DIMLUNIT | 70 | Units for every dimension type except angular: 1 scientific, 2 decimal, 3 engineering, 4 architectural, 5 fractional, 6 Windows desktop |
$DIMLWD | 70 | Dimension line lineweight (−3, −2, −1 or 0–211, above) |
$DIMLWE | 70 | Extension line lineweight (−3, −2, −1 or 0–211, above) |
$DIMPOST | 1 | General dimensioning suffix |
$DIMRND | 40 | Rounding value for dimension distances |
$DIMSAH | 70 | Use separate arrow blocks if nonzero |
$DIMSCALE | 40 | Overall dimensioning scale factor |
$DIMSD1 | 70 | Suppression of the first extension line: 0 not suppressed, 1 suppressed |
$DIMSD2 | 70 | Suppression of the second extension line: 0 not suppressed, 1 suppressed |
$DIMSE1 | 70 | First extension line suppressed if nonzero |
$DIMSE2 | 70 | Second extension line suppressed if nonzero |
$DIMSHO | 70 | 1 recompute dimensions while dragging; 0 drag the original image |
$DIMSOXD | 70 | Suppress dimension lines outside the extension lines if nonzero |
$DIMSTYLE | 2 | Dimension style name |
$DIMTAD | 70 | Text above the dimension line if nonzero |
$DIMTDEC | 70 | Number of decimal places shown for tolerance values |
$DIMTFAC | 40 | Dimension tolerance display scale factor |
$DIMTIH | 70 | Text inside extension lines horizontal if nonzero |
$DIMTIX | 70 | Force text inside the extension lines if nonzero |
$DIMTM | 40 | Minus tolerance |
$DIMTMOVE | 70 | Text movement: 0 move the dimension line with the text, 1 add a leader when text is moved, 2 move text freely without a leader |
$DIMTOFL | 70 | If text is outside the extension lines, force a line between them if nonzero |
$DIMTOH | 70 | Text outside extension lines horizontal if nonzero |
$DIMTOL | 70 | Dimension tolerances generated if nonzero |
$DIMTOLJ | 70 | Vertical justification of tolerance values: 0 top, 1 middle, 2 bottom |
$DIMTP | 40 | Plus tolerance |
$DIMTSZ | 40 | Tick size; 0 means no ticks |
$DIMTVP | 40 | Text vertical position |
$DIMTXSTY | 7 | Dimension text style |
$DIMTXT | 40 | Dimension text height |
$DIMTZIN | 70 | Zero suppression for tolerance values (0–3, above) |
$DIMUPT | 70 | Cursor for user-positioned text: 0 controls only the dimension line position, 1 controls the text position too |
$DIMZIN | 70 | Zero suppression for primary unit values (0–3, above) |
$DISPSILH | 70 | Silhouette curves of bodies in wireframe: 0 off, 1 on |
$DRAGVS | 349 | Hard pointer to the visual style used while creating 3D solid primitives; default none |
$DWGCODEPAGE | 3 | Drawing code page; set to the system code page when the drawing is created, not otherwise maintained |
$ELEVATION | 40 | Current elevation set by ELEV |
$ENDCAPS | 280 | Lineweight end caps for new objects: 0 none, 1 round, 2 angle, 3 square |
$EXTMAX | 10, 20, 30 | Upper-right corner of the drawing extents |
$EXTMIN | 10, 20, 30 | Lower-left corner of the drawing extents |
$EXTNAMES | 290 | Symbol table naming: 0 Release 14 rules (up to 31 characters: A–Z, 0–9, $, _, -); 1 AutoCAD 2000 rules (up to 255 characters, including spaces and any characters not reserved by Windows or AutoCAD) |
$FILLETRAD | 40 | Fillet radius |
$FILLMODE | 70 | Fill mode on if nonzero |
$FINGERPRINTGUID | 2 | Set when the drawing is created; identifies that drawing |
$HALOGAP | 280 | Gap shown where an object is hidden by another, as a percentage of one unit, independent of zoom |
$HANDSEED | 5 | Next available handle |
$HIDETEXT | 290 | 0 HIDE ignores text objects; 1 HIDE does not ignore them |
$HYPERLINKBASE | 1 | Base path for relative hyperlinks; if empty the drawing’s path is used |
$INDEXCTL | 280 | Indexes saved in the drawing: 0 none, 1 layer index, 2 spatial index, 3 both |
$INSBASE | 10, 20, 30 | Insertion base set by BASE |
$INSUNITS | 70 | Default drawing units for DesignCenter blocks: 0 unitless, 1 inches, 2 feet, 3 miles, 4 millimetres, 5 centimetres, 6 metres, 7 kilometres, 8 microinches, 9 mils, 10 yards, 11 ångströms, 12 nanometres, 13 microns, 14 decimetres, 15 decametres, 16 hectometres, 17 gigametres, 18 astronomical units, 19 light years, 20 parsecs |
$INTERFERECOLOR | 62 | Colour index of interference objects made by INTERFERE; default 1 |
$INTERFEREOBJVS | 345 | Hard pointer to the visual style for interference objects; default Conceptual |
$INTERFEREVPVS | 346 | Hard pointer to the viewport visual style during interference checking; default 3d Wireframe |
$INTERSECTIONCOLOR | 70 | Colour of intersection polylines: 1–255 colour index, 0 BYBLOCK, 256 BYLAYER, 257 BYENTITY |
$INTERSECTIONDISPLAY | 290 | Intersection polylines: 0 not shown, 1 shown |
$JOINSTYLE | 280 | Lineweight joints for new objects: 0 none, 1 round, 2 angle, 3 flat |
$LIMCHECK | 70 | Limits checking on if nonzero |
$LIMMAX | 10, 20 | Upper-right corner of the drawing limits |
$LIMMIN | 10, 20 | Lower-left corner of the drawing limits |
$LTSCALE | 40 | Global linetype scale |
$LUNITS | 70 | Units format for coordinates and distances |
$LUPREC | 70 | Units precision for coordinates and distances |
$LWDISPLAY | 290 | Lineweights on the Model or Layout tab: 0 not shown, 1 shown |
$MAXACTVP | 70 | Maximum number of viewports regenerated |
$MEASUREMENT | 70 | Drawing units: 0 English, 1 metric |
$MENU | 1 | Name of the menu file |
$MIRRTEXT | 70 | Mirror text if nonzero |
$OBSCOLOR | 70 | Colour of obscured lines (hidden lines shown by HIDE or SHADEMODE), used only when $OBSLTYPE is not 0: 0 and 256 entity colour, 1–255 a colour index |
$OBSLTYPE | 280 | Linetype of obscured lines, independent of zoom: 0 off (default), 1 solid, 2 dashed, 3 dotted, 4 short dash, 5 medium dash, 6 long dash, 7 double short dash, 8 double medium dash, 9 double long dash, 10 medium long dash, 11 sparse dot |
$ORTHOMODE | 70 | Ortho mode on if nonzero |
$PDMODE | 70 | Point display mode |
$PDSIZE | 40 | Point display size |
$PELEVATION | 40 | Current paper space elevation |
$PEXTMAX | 10, 20, 30 | Maximum extents of paper space |
$PEXTMIN | 10, 20, 30 | Minimum extents of paper space |
$PINSBASE | 10, 20, 30 | Paper space insertion base point |
$PLIMCHECK | 70 | Limits checking in paper space when nonzero |
$PLIMMAX | 10, 20 | Maximum X and Y limits in paper space |
$PLIMMIN | 10, 20 | Minimum X and Y limits in paper space |
$PLINEGEN | 70 | Linetype around 2D polyline vertices: 1 continuous pattern around vertices; 0 each segment starts and ends with a dash |
$PLINEWID | 40 | Default polyline width |
$PROJECTNAME | 1 | Project name, used to find external references and images not found on their original path |
$PROXYGRAPHICS | 70 | Whether images of proxy objects are saved |
$PSLTSCALE | 70 | Paper space linetype scaling: 1 no special scaling; 0 viewport scaling governs linetype scaling |
$PSTYLEMODE | 290 | Plot style mode: 0 named plot style tables; 1 colour-dependent plot style tables |
$PSVPSCALE | 40 | View scale for new viewports: 0 scaled to fit; greater than 0 a scale factor |
$PUCSBASE | 2 | Name of the UCS defining the origin and orientation of orthographic UCS settings (paper space) |
$PUCSNAME | 2 | Current paper space UCS name |
$PUCSORG | 10, 20, 30 | Current paper space UCS origin |
$PUCSORGBACK | 10, 20, 30 | New UCS origin after setting the paper space UCS to BACK while PUCSBASE is WORLD |
$PUCSORGBOTTOM | 10, 20, 30 | The same for BOTTOM |
$PUCSORGFRONT | 10, 20, 30 | The same for FRONT |
$PUCSORGLEFT | 10, 20, 30 | The same for LEFT |
$PUCSORGRIGHT | 10, 20, 30 | The same for RIGHT |
$PUCSORGTOP | 10, 20, 30 | The same for TOP |
$PUCSORTHOREF | 2 | When the paper space UCS is orthographic, the UCS it is relative to; empty means WORLD |
$PUCSORTHOVIEW | 70 | Orthographic type of the paper space UCS (0–6, above) |
$PUCSXDIR | 10, 20, 30 | Current paper space UCS X axis |
$PUCSYDIR | 10, 20, 30 | Current paper space UCS Y axis |
$QTEXTMODE | 70 | Quick text mode on if nonzero |
$REGENMODE | 70 | REGENAUTO on if nonzero |
$SHADEDGE | 70 | 0 faces shaded, edges not highlighted; 1 faces shaded, edges black; 2 faces not filled, edges in entity colour; 3 faces in entity colour, edges black |
$SHADEDIF | 70 | Percentage of ambient to diffuse light, 1–100, default 70 |
$SHADOWPLANELOCATION | 40 | Z of the ground shadow plane |
$SKETCHINC | 40 | Sketch record increment |
$SKPOLY | 70 | 0 sketch lines; 1 sketch polylines |
$SORTENTS | 280 | Object sorting, bit flags: 0 off; 1 for object selection, 2 object snap, 4 redraws, 8 MSLIDE slides, 16 REGEN, 32 plotting, 64 PostScript output |
$SPLINESEGS | 70 | Line segments per spline patch |
$SPLINETYPE | 70 | Spline curve type for PEDIT Spline |
$SURFTAB1 | 70 | Mesh tabulations in the first direction |
$SURFTAB2 | 70 | Mesh tabulations in the second direction |
$SURFTYPE | 70 | Surface type for PEDIT Smooth |
$SURFU | 70 | Surface density in M for PEDIT Smooth |
$SURFV | 70 | Surface density in N for PEDIT Smooth |
$TDCREATE | 40 | Local date and time the drawing was created (see dates) |
$TDINDWG | 40 | Total editing time |
$TDUCREATE | 40 | Universal date and time the drawing was created |
$TDUPDATE | 40 | Local date and time of the last update |
$TDUSRTIMER | 40 | User elapsed timer |
$TDUUPDATE | 40 | Universal date and time of the last update or save |
$TEXTSIZE | 40 | Default text height |
$TEXTSTYLE | 7 | Current text style name |
$THICKNESS | 40 | Current thickness set by ELEV |
$TILEMODE | 70 | 1 for previous release compatibility mode; 0 otherwise |
$TRACEWID | 40 | Default trace width |
$TREEDEPTH | 70 | Maximum depth of the spatial index |
$UCSBASE | 2 | Name of the UCS defining the origin and orientation of orthographic UCS settings |
$UCSNAME | 2 | Name of the current UCS |
$UCSORG | 10, 20, 30 | Origin of the current UCS |
$UCSORGBACK | 10, 20, 30 | New UCS origin after setting the model space UCS to BACK while UCSBASE is WORLD |
$UCSORGBOTTOM | 10, 20, 30 | The same for BOTTOM |
$UCSORGFRONT | 10, 20, 30 | The same for FRONT |
$UCSORGLEFT | 10, 20, 30 | The same for LEFT |
$UCSORGRIGHT | 10, 20, 30 | The same for RIGHT |
$UCSORGTOP | 10, 20, 30 | The same for TOP |
$UCSORTHOREF | 2 | When the model space UCS is orthographic, the UCS it is relative to; empty means WORLD |
$UCSORTHOVIEW | 70 | Orthographic type of the model space UCS (0–6, above) |
$UCSXDIR | 10, 20, 30 | Direction of the current UCS X axis |
$UCSYDIR | 10, 20, 30 | Direction of the current UCS Y axis |
$UNITMODE | 70 | Low bit set: show fractions, feet-and-inches and surveyor’s angles in input format |
$USERI1 – $USERI5 | 70 | Five integers for third-party developers |
$USERR1 – $USERR5 | 40 | Five reals for third-party developers |
$USRTIMER | 70 | 0 timer off; 1 timer on |
$VERSIONGUID | 2 | Identifies this version of the drawing; changes when the drawing is modified |
$VISRETAIN | 70 | 0 do not keep xref-dependent visibility settings; 1 keep them |
$WORLDVIEW | 70 | 0 do not change the UCS; 1 set the UCS to the WCS during DVIEW and VPOINT |
$XCLIPFRAME | 290 | Xref clipping boundary: 0 not visible, 1 visible |
$XEDIT | 290 | In-place reference editing of this drawing from another: 0 not allowed, 1 allowed |
Revised VPORT variables
These variables predate Release 11, which gave each viewport its own settings. They
are still read from DXF files, but when a VPORT table with *ACTIVE
entries is present (as in any file written by Release 11 or later), the table’s
values override them.
| Variable | Code | Meaning |
|---|---|---|
$FASTZOOM | 70 | Fast zoom enabled if nonzero |
$GRIDMODE | 70 | Grid on if nonzero |
$GRIDUNIT | 10, 20 | Grid X and Y spacing |
$SNAPANG | 50 | Snap grid rotation angle |
$SNAPBASE | 10, 20 | Snap and grid base point (in the UCS) |
$SNAPISOPAIR | 70 | Isometric plane: 0 left, 1 top, 2 right |
$SNAPMODE | 70 | Snap on if nonzero |
$SNAPSTYLE | 70 | Snap style: 0 standard, 1 isometric |
$SNAPUNIT | 10, 20 | Snap X and Y spacing |
$VIEWCTR | 10, 20 | X and Y of the centre of the current view |
$VIEWDIR | 10, 20, 30 | Viewing direction (from the target, in the WCS) |
$VIEWSIZE | 40 | Height of the view |
Dates and times
$TDCREATE, $TDUCREATE, $TDUPDATE and
$TDUUPDATE are Julian dates: the whole part is the Julian day number
and the fraction is the fraction of a day. 31 December 1999 at 21:58:35 GMT is
2451544.91568287. Seconds since midnight are 86400 × (value − whole
part). The local times are true Julian dates only when the computer’s clock is set
to UTC.
$TDINDWG and $TDUSRTIMER are elapsed times in the same
form: number of days, then the fraction of a day.
The reference also describes the CDATE system variable, which is not saved in the
file: a real number YYYYMMDD.HHMMSShsec (hsec in hundredths), such as
20051231.21583575 for 31 December 2005 at 21:58:35.75. CDATE values
sort correctly but cannot be subtracted.
Sources
- AutoCAD 2014 DXF Reference – Autodesk, March 2013, chapter 2 (HEADER section)
- AutoCAD 2018 DXF Reference: HEADER section group codes – Autodesk’s online edition, which adds
AC1032