📄 dxf.txt
字号:
AutoCAD Reference Manual
TABLES
0
TABLE
2
VPORT
70
(viewport table maximum item count)
<<<<viewport table items go here>>>>
0
ENDTAB
0
TABLE
2
LTYPE, LAYER, STYLE, VIEW, UCS, or DWGMGR
70
(Table maximum item count)
<<<<Table items go here>>>>
0
ENDTAB
0
ENDSEC (End TABLES section)
0 (Begin BLOCKS section)
SECTION
2
BLOCKS
<<<<Block definition entities go here>>>>
0
ENDSEC (End BLOCKS section)
0 (Begin ENTITIES section)
SECTION
2
ENTITIES
<<<<Drawing entities go here>>>>
0
ENDSEC (End ENTITIES section)
0
EOF (End of file)
C.1.5.1 HEADER Section
The HEADER section of the DXF file contains settings of variables
associated with the drawing. These variables are set with various commands
and are the type of information displayed by the STATUS command. Each
variable is specified in the header section by a 9 group giving its name,
followed by groups that supply its value. The header variables, the groups
that follow, and their meanings are listed below.
Although this list is very similar to the list of system variables in
Appendix A, the two lists are not identical. Be sure you're referring to
the proper list.
6
(C) Drawing Interchange and File Formats
$ACADVER 1 the AutoCAD drawing database version number.
$ANGBASE 50 Angle 0 direction.
$ANGDIR 70 1=clockwise angles, 0=counterclockwise.
$ATTDIA 70 Attribute entry dialogues, 1 = on, 0 = off
$ATTMODE 70 Attribute visibility: 0=none, 1=normal, 2=all.
$ATTREQ 70 Attribute prompting during INSERT, 1 = on, 0 = off
$AUNITS 70 UNITS format for angles.
$AUPREC 70 UNITS precision for angles.
$AXISMODE 70 axis on if nonzero.
$AXISUNIT 10,20 axis X and Y tick spacing.
$BLIPMODE 70 blip mode on if nonzero.
$CECOLOR 62 entity color number; 0 = BYBLOCK, 256 = BYLAYER.
$CELTYPE 6 entity linetype name, or BYBLOCK or BYLAYER.
$CHAMFERA 40 first chamfer distance.
$CHAMFERB 40 second chamfer distance.
$CLAYER 8 current layer name.
$COORDS 70 0=static coordinate display, 1=continuous update,
2="d<a" format.
$DIMALT 70 alternate unit dimensioning performed if nonzero.
$DIMALTD 70 alternate unit decimal places.
$DIMALTF 40 alternate unit scale factor.
$DIMAPOST 1 alternate dimensioning suffix
$DIMASO 70 1=create associative dimensioning, 0=draw
individual entities.
$DIMASZ 40 dimensioning arrow size.
$DIMBLK 2 arrow block name.
$DIMBLK1 1 first arrow block name.
$DIMBLK2 1 second arrow block name.
$DIMCEN 40 size of center mark/lines.
$DIMDLE 40 dimension line extension.
$DIMDLI 40 dimension line increment.
$DIMEXE 40 extension line extension.
$DIMEXO 40 extension line offset.
$DIMLFAC 40 linear measurements scale factor.
$DIMLIM 70 dimension limits generated if nonzero.
$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.
$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 original image.
$DIMSOXD 70 suppress outside-extensions dimension lines
if nonzero.
$DIMTAD 70 text above dimension line if nonzero.
$DIMTIH 70 text inside horizontal if nonzero.
$DIMTIX 70 force text inside extensions if nonzero.
$DIMTM 40 minus tolerance.
$DIMTOFL 70 if text outside extensions, force line between
extensions if nonzero.
$DIMTOH 70 text outside horizontal if nonzero.
7
AutoCAD Reference Manual
$DIMTOL 70 dimension tolerances generated if nonzero.
$DIMTP 40 plus tolerance.
$DIMTSZ 40 dimensioning tick size: 0=no ticks.
$DIMTVP 40 text vertical position.
$DIMTXT 40 dimensioning text height.
$DIMZIN 70 zero suppression for "feet & inch" dimensions.
$DRAGMODE 70 0=off, 1=on, 2=auto.
$ELEVATION 40 current elevation set by ELEV command.
$EXTMAX 10,20,30 XY drawing extents upper right corner (in WCS).
$EXTMIN 10,20,30 XY drawing extents lower left corner (in WCS).
$FILLETRAD 40 fillet radius.
$FILLMODE 70 FILL mode on if nonzero.
$FLATLAND 70 force compatibility with older versions if nonzero.
$HANDLING 70 handles enabled if nonzero.
$HANDSEED 5 next available handle.
$INSBASE 10,20,30 insertion base set by BASE command (in WCS).
$LIMCHECK 70 nonzero if limits checking is on.
$LIMMAX 10,20 XY drawing limits upper right corner (in WCS).
$LIMMIN 10,20 XY drawing limits lower left corner (in WCS).
$LTSCALE 40 global linetype scale.
$LUNITS 70 UNITS format for coordinates and distances.
$LUPREC 70 UNITS precision for coordinates and distances.
$MENU 1 name of menu file.
$MIRRTEXT 70 MIRROR text if nonzero.
$ORTHOMODE 70 ORTHO mode on if nonzero.
$OSMODE 70 running object snap modes.
$PDMODE 70 point display mode.
$PDSIZE 40 point display size.
$PLINEWID 40 default Polyline width.
$QTEXTMODE 70 quick text mode on if nonzero.
$REGENMODE 70 REGENAUTO mode on if nonzero.
$SKETCHINC 40 sketch record increment.
$SKPOLY 70 0=sketch lines, 1=sketch polylines.
$SPLFRAME 70 spline control polygon display, 1 = on, 0 = off.
$SPLINESEGS 70 number of line segments per spline patch.
$SPLINETYPE 70 spline curve type for "PEDIT Spline"
(see Appendix A).
$SURFTAB1 70 number of mesh tabulations in first direction.
$SURFTAB2 70 number of mesh tabulations in second direction.
$SURFTYPE 70 surface type for "PEDIT Smooth" (see Appendix A).
$SURFU 70 surface density (for "PEDIT Smooth") in M direction.
$SURFV 70 surface density (for "PEDIT Smooth") in N direction.
$TDCREATE 40 date/time of drawing creation.
$TDINDWG 40 cumulative editing time for this drawing.
$TDUPDATE 40 date/time of last drawing update.
$TDUSRTIMER 40 user elapsed timer.
$TEXTSIZE 40 default text height.
$TEXTSTYLE 7 current text style name.
$THICKNESS 40 current thickness set by ELEV command.
$TRACEWID 40 default Trace width.
$UCSNAME 1 Name of current UCS.
$UCSORG 10,20,30 origin of current UCS (in WCS).
8
(C) Drawing Interchange and File Formats
$UCSXDIR 10,20,30 direction of current UCS's X axis
(in World coordinates).
$UCSYDIR 10,20,30 direction of current UCS's Y axis
(in World coordinates).
$USERI1 - 5 70 Five integer variables intended for use by
third-party developers.
$USERR1 - 5 40 Five real variables intended for use by
third-party developers.
$USRTIMER 70 0=timer off, 1=timer on.
$WORLDVIEW 70 1=set UCS to WCS during DVIEW/VPOINT,
0=don't change UCS
The header variables listed below existed prior to AutoCAD Release 10 but
now have independent settings for each active viewport. They are not
output by DXFOUT unless system variable FLATLAND is set to 1. DXFIN honors
these variables when read from DXF files, but if a VPORT symbol table with
"*ACTIVE" entries is present (as is true for any DXF file produced by
Release 10 or higher), the values in the VPORT table entries will override
the values of these header variables.
$FASTZOOM 70 fast zoom enabled if nonzero.
$GRIDMODE 70 grid mode on if nonzero.
$GRIDUNIT 10,20 grid X and Y spacing.
$SNAPANG 50 snap grid rotation angle.
$SNAPBASE 10,20 snap/grid base point (in UCS).
$SNAPISOPAIR 70 isometric plane: 0=left, 1=top, 2=right.
$SNAPMODE 70 snap mode on if nonzero.
$SNAPSTYLE 70 snap style: 0=standard, 1=isometric.
$SNAPUNIT 10,20 snap grid X and Y spacing.
$VIEWCTR 10,20 XY center of current view on screen.
$VIEWDIR 10,20,30 viewing direction (direction from target, in WCS).
$VIEWSIZE 40 height of view.
The date/time variables ($TDCREATE and $TDUPDATE) are output as real num-
bers in the format:
<Julian date>.<Fraction>
The elapsed time variables ($TDINDWG and $TDUSRTIMER) have a similar
format:
<Number of days>.<Fraction>
C.1.5.2 TABLES Section
The TABLES section contains several tables, each of which in turn contains
a variable number of table entries. The order of the tables may change, but
the LTYPE table will always precede the LAYER table. Each table is intro-
duced with a 0 group with the label "TABLE". This is followed by a 2 group
identifying the particular table (VPORT, LTYPE, LAYER, STYLE, VIEW, UCS, or
DWGMGR) and a 70 group that specifies the maximum number of table entries
9
AutoCAD Reference Manual
that may follow. The tables in a drawing may contain deleted items, but
these are not written to the DXF file. Thus, fewer table entries may
follow the table header than are indicated by the 70 group, so don't use
the count in the 70 group as an index to read in the table. It is provided
so that your program to read DXF files can allocate an array in advance
large enough to hold all the table entries that follow.
Following this header for each table are the table entries. Each table
item consists of a 0 group identifying the item type (same as table name,
e.g., "LTYPE" or "LAYER"), a 2 group giving the name of the table entry, a
70 group specifying flags relevant to the table entry (defined for each
table below), and additional groups that give the value of the table entry.
The end of each table is indicated by a 0 group with the value "ENDTAB".
If any table entry has bit value 64 set in its group 70 flags, the table
entry was referenced by at least one entity in the drawing the last time
the drawing editor was entered to edit this drawing. This "referenced"
flag is for the benefit of the PURGE command; it can be ignored by most
programs that read DXF files, and need not be set by programs that write
DXF files.
The following are the groups used for each type of table item. All groups
are present for each table item.
LTYPE 3 (descriptive text for linetype), 72 (alignment code), 73
(number of dash length items), 40 (total pattern length), 49
(dash length 1), 49 (dash length 2), . . .
LAYER 62 (color number, negative if layer is off), 6 (linetype
name). The 1 bit is set in the 70 group flags if the layer is
frozen.
STYLE 40 (fixed text height; 0 if not fixed), 41 (width factor), 50
(obliquing angle), 71 (text generation flags), 42 (last height
used), 3 (primary font file name), 4 ("bigfont" file name;
blank if none). If the third bit (4) is set in the 70 group
flags, this is a vertically-oriented text style.
A STYLE table item is used to record shape file LOAD requests
also. In this case the first bit (1) is set in the 70 group
flags and only the 3 group (shape file name) is meaningful
(all the other groups are output, however).
The "text generation flags" are a bit-coded field with the
following bit meanings:
Flag bit value Meaning
2 Text is backwards (mirrored in X)
4 Text is upside down (mirrored in Y)
10
(C) Drawing Interchange and File Formats
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -