DXF 组码完全参考手册DXF Group Codes Complete Reference Manual
数据类型总表Data Type Summary
DXF 中每个组码范围对应固定的数据类型。下表列出所有组码范围及其对应的数据类型。Each group code range in DXF maps to a fixed data type. The following table lists all ranges and their corresponding types.
| 组码范围Code Range | 数据类型Data Type | 说明Description |
|---|---|---|
| -5 ~ -1 | 特殊 | 仅在 AutoLISP/ObjectARX 中使用Used only in AutoLISP/ObjectARX |
| 0 ~ 9 | String | 字符串,AutoCAD 2000 起上限 2049 字符String, max 2049 chars since AutoCAD 2000 |
| 10 ~ 39 | Double | 双精度三维点(X=10, Y=20, Z=30 系列)Double precision 3D point (X=10, Y=20, Z=30 series) |
| 40 ~ 59 | Double | 双精度浮点值(半径、高度、角度等标量)Double precision float (radius, height, angles, etc.) |
| 60 ~ 79 | Int16 | 16 位整数(标志位、模式、重复计数)16-bit integer (flags, modes, repeat counts) |
| 90 ~ 99 | Int32 | 32 位整数(顶点数、元素数量等)32-bit integer (vertex counts, element counts) |
| 100 | String | 子类标记(Subclass Marker),如 “AcDbCircle”Subclass Marker, e.g. “AcDbCircle” |
| 102 | String | 控制字符串 “{name}” / “}”Control string “{name}” / “}” |
| 105 | Handle | DIMVAR 符号表对象句柄DIMVAR symbol table object handle |
| 110 ~ 139 | Double | UCS 原点/轴方向向量(X=110, Y=120, Z=130)UCS origin/axis direction (X=110, Y=120, Z=130) |
| 140 ~ 149 | Double | 双精度标量值(DIMSTYLE 设置等)Double precision scalar (DIMSTYLE settings, etc.) |
| 170 ~ 179 | Int16 | 16 位整数(DIMSTYLE 标志位)16-bit integer (DIMSTYLE flags) |
| 210 ~ 239 | Double | 拉伸方向向量(X=210, Y=220, Z=230)Extrusion direction vector (X=210, Y=220, Z=230) |
| 270 ~ 289 | Int16 | 16 位整数(杂项标志)16-bit integer (miscellaneous flags) |
| 290 ~ 299 | Boolean | 布尔标志值(0=False, 1=True)Boolean flag (0=False, 1=True) |
| 300 ~ 309 | String | 任意字符串Arbitrary string |
| 310 ~ 319 | Binary | 二进制数据块(十六进制字符串,最多 127 字节)Binary chunk (hex string, max 127 bytes) |
| 320 ~ 329 | Handle | 原始句柄值(INSERT/XREF 时不转换)Raw handle (no translation on INSERT/XREF) |
| 330 ~ 339 | Soft Ptr | 软指针句柄(指向其他对象的引用)Soft pointer handle (reference to other objects) |
| 340 ~ 349 | Hard Ptr | 硬指针句柄(强引用,不可为 NULL)Hard pointer handle (strong reference, non-NULL) |
| 350 ~ 359 | Soft Own | 软所有者句柄Soft owner handle |
| 360 ~ 369 | Hard Own | 硬所有者句柄Hard owner handle |
| 370 ~ 379 | Int16 | 线宽枚举值(LineWeight)Lineweight enum value |
| 380 ~ 389 | Int16 | 打印样式名类型枚举Plot style name type enum |
| 390 ~ 399 | Handle | 打印样式对象句柄Plot style object handle |
| 400 ~ 409 | Int16 | 16 位整数16-bit integer |
| 410 ~ 419 | String | 应用程序名称(如 “ACAD”)Application name (e.g. “ACAD”) |
| 420 ~ 429 | Int32 | 真彩色值(0x00RRGGBB)True color value (0x00RRGGBB) |
| 430 ~ 439 | String | 颜色名称Color name |
| 440 ~ 449 | Int32 | 透明度值Transparency value |
| 450 ~ 459 | Int64 | 64 位长整数64-bit long integer |
| 460 ~ 469 | Double | 双精度浮点值Double precision float |
| 470 ~ 479 | String | 字符串String |
| 999 | String | DXF 注释(OPEN 忽略,SAVEAS 不输出)DXF comment (ignored by OPEN, not output by SAVEAS) |
| 1000 ~ 1009 | String | 扩展数据 XDATA 字符串XDATA string |
| 1010 ~ 1059 | Double | XDATA 中的点/浮点值XDATA point/float values |
| 1060 ~ 1070 | Int16 | XDATA 中的整数值XDATA integer values |
| 1071 | Int32 | XDATA 中的长整数值XDATA long integer |
特殊/内部组码Special / Internal Codes
这些组码仅用于 AutoLISP 和 ObjectARX 应用程序内部,不会出现在 DXF 文件中。These codes are used internally by AutoLISP and ObjectARX applications and do not appear in DXF files.
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| -5 | Persistent Reactor ChainPersistent Reactor Chain | 永久反应器链Persistent Reactor Chain |
| -4 | Conditional Operator (ssget)Conditional Operator (ssget) | 条件运算符(仅 ssget 使用)Conditional Operator (ssget only) |
| -3 | XDATA MarkerXDATA Marker | 扩展数据标记XDATA Marker |
| -2 | Entity Name ReferenceEntity Name Reference | 图元名参照Entity Name Reference |
| -1 | Entity NameEntity Name | 图元名(运行时动态分配)Entity name (runtime dynamic) |
通用实体组码 (0~99)Common Entity Codes (0-99)
每个图形实体(图元)共有的属性组码。标注为”固定”的组码几乎在每个实体中出现。Attribute codes common to every graphical entity. Codes marked “fixed” appear in nearly every entity.
| 组码Code | 英文名称English Name | 中文说明Chinese Description | 数据类型Type | 固定Fixed |
|---|---|---|---|---|
| 0 | Entity Type | 实体类型(如 LINE, CIRCLE 等)Entity type (e.g. LINE, CIRCLE) | String | 是Yes |
| 1 | Primary Text Value | 实体的主文字值Primary text value of entity | String | – |
| 2 | Name | 名称(属性标记、块名、标注样式名等)Name (attribute tag, block name, dimstyle, etc.) | String | – |
| 3 | Supplementary Text | 辅助文本(属性提示、附加文字等)Supplementary text (attribute prompts, extra text) | String | – |
| 4 | Other Text/Name | 其他文字或名称值Other text or name value | String | – |
| 5 | Handle | 实体句柄(十六进制字符串)Entity handle (hex string) | String | 是Yes |
| 6 | Linetype Name | 线型名称Linetype name | String | 是Yes |
| 7 | Text Style Name | 文字样式名称Text style name | String | 是Yes |
| 8 | Layer Name | 图层名称Layer name | String | 是Yes |
| 9 | Variable Name Identifier | DXF HEADER 段变量名(如 $ACADVER)DXF HEADER variable name (e.g. $ACADVER) | String | 仅 HEADERHEADER only |
| 10 | Primary Point X | 主点 X(圆心、起点、插入点等)Primary point X (center, start, insert point) | Double | – |
| 11 | Other Point X | 其他点 X(终点、第二点等)Other point X (end point, second point) | Double | – |
| 12 | Other Point X | 其他点 XOther point X | Double | – |
| 13~18 | Other Points X | 其他点 X 值(标注定义点等)Other point X values (dimension definition points) | Double | – |
| 20 | Primary Point Y | 主点 YPrimary point Y | Double | – |
| 21~28 | Other Points Y | 其他点 Y 值Other point Y values | Double | – |
| 30 | Primary Point Z | 主点 ZPrimary point Z | Double | – |
| 31~37 | Other Points Z | 其他点 Z 值Other point Z values | Double | – |
| 38 | Entity Elevation | 实体标高(非零时有效)Entity elevation (when non-zero) | Double | – |
| 39 | Entity Thickness | 实体厚度(非零时有效)Entity thickness (when non-zero) | Double | 是Yes |
| 40 | Double Float Value | 浮点值(半径、高度、缩放等)Float value (radius, height, scale) | Double | – |
| 41 | Double Float Value | X 方向缩放、宽度等X scale factor, width | Double | – |
| 42 | Double Float Value | 凸度(LWPOLYLINE)、Y 缩放等Bulge (LWPOLYLINE), Y scale | Double | – |
| 43 | Double Float Value | Z 方向缩放、列间距等Z scale, column spacing | Double | – |
| 44 | Double Float Value | 标注箭头大小等Dimension arrow size | Double | – |
| 45~47 | Double Float Value | 其他标量值Other scalar values | Double | – |
| 48 | Linetype Scale | 线型比例Linetype scale factor | Double | – |
| 49 | Repeated Double Value | 重复浮点值(如线型虚线长度)Repeated float (e.g. linetype dash lengths) | Double | – |
| 50 | Angle (degrees) | 角度值(DXF 中以度为单位)Angle in degrees | Double | – |
| 51 | Angle (degrees) | 角度值(终点角度等)Angle (end angle, etc.) | Double | – |
| 52~58 | Angle (degrees) | 其他角度值Other angle values | Double | – |
| 60 | Entity Visibility | 实体可见性(0=可见, 1=不可见)Visibility (0=visible, 1=invisible) | Int16 | – |
| 62 | Color Number | 颜色号(0=ByBlock, 256=ByLayer)Color number (0=ByBlock, 256=ByLayer) | Int16 | 是Yes |
| 66 | Entity Follow Flag | 实体跟随标志(如 VERTEX 跟随 POLYLINE)Entity follow flag (e.g. VERTEX follows POLYLINE) | Int16 | 是Yes |
| 67 | Space Flag | 空间标志(0=模型空间, 1=图纸空间)Space flag (0=model space, 1=paper space) | Int16 | 是Yes |
| 68 | Viewport State | 视口状态(打开/关闭/未激活)Viewport state (on/off/not active) | Int16 | – |
| 69 | Viewport Number | 视口标识号Viewport identification number | Int16 | – |
| 70 | Integer Value | 整数值(标志位、重复计数、闭合标志等)Integer (flags, repeat count, closed flag) | Int16 | – |
| 71~78 | Integer Values | 整数值(列数/行数、标注类型、文字对齐等)Integer (col/row count, dim type, text alignment) | Int16 | – |
| 90 | 32-bit Integer | 32 位整数(顶点总数等)32-bit integer (total vertex count) | Int32 | – |
| 91~99 | 32-bit Integers | 32 位整数32-bit integers | Int32 | – |
子类标记与对象引用 (100~399)Subclass Markers & Object References (100-399)
子类标记用于标识实体所属的 DXF 类层次,对象引用组码用于建立实体间的关系链接。Subclass markers identify the DXF class hierarchy of entities. Object reference codes establish relationship links between entities.
| 组码Code | 英文名称English Name | 中文说明Chinese Description | 数据类型Type |
|---|---|---|---|
| 100 | Subclass Marker | 子类数据标记(如 “AcDbEntity”, “AcDbCircle”)Subclass data marker (e.g. “AcDbEntity”, “AcDbCircle”) | String |
| 102 | Control String | 控制字符串 “{<name>}” 或 “}”Control string “{<name>}” or “}” | String |
| 105 | Object Handle (DIMVAR) | DIMVAR 符号表条目对象句柄DIMVAR symbol table entry handle | Handle |
| 110 | UCS Origin X | UCS 原点 X 值UCS origin X | Double |
| 111 | UCS X-Axis X | UCS X 轴方向 X 分量UCS X-axis direction X | Double |
| 112 | UCS Y-Axis X | UCS Y 轴方向 X 分量UCS Y-axis direction X | Double |
| 120~122 | UCS Origin/Axis Y | UCS 原点/轴 Y 值UCS origin/axis Y | Double |
| 130~132 | UCS Origin/Axis Z | UCS 原点/轴 Z 值UCS origin/axis Z | Double |
| 140~149 | Scalar Float Values | 双精度标量值(DIMSTYLE 设置等)Scalar floats (DIMSTYLE settings) | Double |
| 170~179 | 16-bit Integers | 16 位整数(DIMSTYLE 标志位)16-bit integers (DIMSTYLE flags) | Int16 |
| 210 | Extrusion Direction X | 拉伸方向 X 分量Extrusion direction X | Double |
| 220 | Extrusion Direction Y | 拉伸方向 Y 分量Extrusion direction Y | Double |
| 230 | Extrusion Direction Z | 拉伸方向 Z 分量Extrusion direction Z | Double |
| 270~279 | 16-bit Integers | 杂项 16 位整数标志Miscellaneous 16-bit flags | Int16 |
| 280~289 | 16-bit Integers | 杂项 16 位整数标志Miscellaneous 16-bit flags | Int16 |
| 290~299 | Boolean Flags | 布尔标志值(0=False, 1=True)Boolean flags (0=False, 1=True) | Boolean |
| 300~309 | Arbitrary Strings | 任意字符串Arbitrary strings | String |
| 310~319 | Binary Data Chunks | 二进制数据块(十六进制字符串,最多 127 字节)Binary data (hex string, max 127 bytes) | Binary |
| 320~329 | Hard Handles | 原始句柄值(INSERT/XREF 时不转换)Raw handles (no translation on INSERT/XREF) | Handle |
| 330~339 | Soft Pointers | 软指针句柄(指向其他对象的弱引用)Soft pointer (weak reference to other objects) | Soft Ptr |
| 340~349 | Hard Pointers | 硬指针句柄(强引用,不可为 NULL)Hard pointer (strong reference, non-NULL) | Hard Ptr |
| 350~359 | Soft Owners | 软所有者句柄Soft owner handles | Soft Own |
| 360~369 | Hard Owners | 硬所有者句柄Hard owner handles | Hard Own |
| 370 | Lineweight | 线宽枚举值Lineweight enum value | Int16 |
| 380 | PlotStyleName Type | 打印样式名类型枚举Plot style name type enum | Int16 |
| 390 | PlotStyleName Handle | 打印样式对象句柄Plot style object handle | Handle |
颜色与打印样式 (400~479)Color & Plot Style (400-479)
真彩色、颜色名称、透明度及打印样式相关组码。Group codes for true color, color names, transparency, and plot styles.
| 组码Code | 英文名称English Name | 中文说明Chinese Description | 数据类型Type |
|---|---|---|---|
| 400~409 | 16-bit Integers | 16 位整数(预留)16-bit integers (reserved) | Int16 |
| 410 | App Name | 应用程序名称(如 “ACAD”)Application name (e.g. “ACAD”) | String |
| 420 | True Color (RGB) | 真彩色 32 位值 (0x00RRGGBB)True color 32-bit (0x00RRGGBB) | Int32 |
| 430 | Color Name | 颜色名称字符串Color name string | String |
| 440 | Transparency | 透明度值Transparency value | Int32 |
| 450~459 | Long Integers | 64 位长整数64-bit long integers | Int64 |
| 460~469 | Double Floats | 双精度浮点值Double precision floats | Double |
| 470~479 | Strings | 字符串Strings | String |
扩展数据 XDATA (1000~1071)Extended Data XDATA (1000-1071)
扩展数据是应用程序附加到 DXF 实体上的自定义数据,以组码 1000~1071 编码。Extended data is custom data attached to DXF entities by applications, encoded with group codes 1000-1071.
| 组码Code | 英文名称English Name | 中文说明Chinese Description | 数据类型Type |
|---|---|---|---|
| 1000 | XDATA String | ASCII 字符串(最多 255 字节)ASCII string (max 255 bytes) | String |
| 1001 | Registered App Name | 注册的应用程序名(最多 31 字节)Registered app name (max 31 bytes) | String |
| 1002 | XDATA Control String | 控制字符串 “{” 或 “}”Control string “{” or “}” | String |
| 1003 | XDATA Layer Name | XDATA 图层名XDATA layer name | String |
| 1004 | XDATA Binary Chunk | 二进制数据块(最多 127 字节)Binary chunk (max 127 bytes) | Binary |
| 1005 | XDATA Handle | 实体句柄(十六进制字符串)Entity handle (hex string) | Handle |
| 1010 | XDATA Point | XDATA 点 X 值XDATA point X | Double |
| 1011 | XDATA 3D World Position | 世界空间位置 X3D world space position X | Double |
| 1012 | XDATA 3D World Displacement | 世界空间位移 X3D world space displacement X | Double |
| 1013 | XDATA 3D World Direction | 世界空间方向 X3D world space direction X | Double |
| 1020,1030 | XDATA Point Y/Z | XDATA 点 Y/Z 值XDATA point Y/Z | Double |
| 1021~1033 | XDATA Position Y/Z | XDATA 位置/位移/方向 Y/ZXDATA position/displacement/direction Y/Z | Double |
| 1040 | XDATA Float | XDATA 浮点值XDATA float value | Double |
| 1041 | XDATA Distance | XDATA 距离值XDATA distance value | Double |
| 1042 | XDATA Scale | XDATA 缩放比例XDATA scale factor | Double |
| 1070 | XDATA 16-bit Integer | 16 位有符号整数16-bit signed integer | Int16 |
| 1071 | XDATA 32-bit Integer | 32 位有符号长整数32-bit signed long integer | Int32 |
实体组码详解Entity Group Codes Detail
每种 DXF 图形实体有自己特有的组码组合。以下按实体类型逐一列出所有专属组码。Each DXF entity type has its own specific combination of group codes. The following lists all dedicated codes by entity type.
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | Start Point | 起点 (配合 20,30)Start point (with 20,30) |
| 11 | End Point | 终点 (配合 21,31)End point (with 21,31) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | Center Point | 圆心 (配合 20,30)Center (with 20,30) |
| 40 | Radius | 半径Radius |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | Center Point | 圆心 (配合 20,30)Center (with 20,30) |
| 40 | Radius | 半径Radius |
| 50 | Start Angle | 起始角度(度)Start angle (degrees) |
| 51 | End Angle | 终止角度(度)End angle (degrees) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 1 | Text Value | 文字内容Text content |
| 10 | Insertion Point | 插入点Insertion point |
| 40 | Text Height | 文字高度Text height |
| 41 | Width Factor | 宽度比例因子Width factor |
| 50 | Rotation Angle | 旋转角度Rotation angle |
| 51 | Oblique Angle | 倾斜角度Oblique angle |
| 71 | Text Generation Flags | 文字生成标志(2=倒置, 4=反向)Text gen flags (2=upside-down, 4=backward) |
| 72 | Horizontal Justification | 水平对齐方式H-justification |
| 73 | Vertical Justification | 垂直对齐方式V-justification |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 1 | Text Value | 多行文字内容(含格式代码)Text content (with format codes) |
| 3 | Additional Text | 附加文字(超长时续接)Additional text (continuation) |
| 10 | Insertion Point | 插入点Insertion point |
| 40 | Nominal Text Height | 标称文字高度Nominal text height |
| 41 | Reference Rectangle Width | 参考矩形宽度Reference rect width |
| 42 | Reference Rectangle Height | 参考矩形高度Reference rect height |
| 71 | Attachment Point | 文字对齐附着点Attachment point |
| 72 | Drawing Direction | 文字绘制方向Drawing direction |
| 73 | MText Line Spacing Style | 行间距样式Line spacing style |
| 90 | Column Type | 分栏类型 (R2018+)Column type (R2018+) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 1 | Dimension Text | 用户覆盖的标注文字User-overridden dimension text |
| 2 | Block Name | 标注块名Dimension block name |
| 3 | Dimension Style Name | 标注样式名Dimension style name |
| 10 | Definition Point | 定义点(所有类型共用第一个)Definition point (first, common to all) |
| 11 | Text Midpoint | 标注文字中点Text midpoint |
| 13 | First Extension Line Origin | 第一条延伸线原点1st extension line origin |
| 14 | Second Extension Line Origin | 第二条延伸线原点2nd extension line origin |
| 15 | Diameter/Radius Def. Point | 直径/半径定义点Diameter/radius definition point |
| 16 | Angular Arc Point | 角度标注弧线定义点Angular arc definition point |
| 50 | Dimension Line Angle | 标注线旋转角度Dimension line angle |
| 51 | Horizontal Direction | 水平方向角度Horizontal direction angle |
| 70 | Dimension Type | 标注类型(0=线性, 1=对齐, 2=角度, 3=直径, 4=半径)Dim type (0=linear, 1=aligned, 2=angular, 3=diameter, 4=radius) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 90 | Number of Vertices | 顶点总数Total vertex count |
| 70 | Polyline Flags | 标志位(1=闭合, 128=Plinegen)Flags (1=closed, 128=Plinegen) |
| 10 | Vertex X | 各顶点 X 坐标(连续出现)Vertex X (repeating) |
| 20 | Vertex Y | 各顶点 Y 坐标(连续出现)Vertex Y (repeating) |
| 40 | Start Width | 起始宽度Start width |
| 41 | End Width | 终止宽度End width |
| 42 | Bulge | 凸度(0=直线, 正=逆时针弧, 负=顺时针弧)Bulge (0=line, +=CCW arc, -=CW arc) |
| 43 | Constant Width | 恒定宽度(全局)Constant width (global) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 2 | Block Name | 块定义名称Block definition name |
| 10 | Insertion Point | 插入点Insertion point |
| 41 | X Scale Factor | X 方向缩放比例X scale factor |
| 42 | Y Scale Factor | Y 方向缩放比例Y scale factor |
| 43 | Z Scale Factor | Z 方向缩放比例Z scale factor |
| 50 | Rotation Angle | 旋转角度(度)Rotation angle (degrees) |
| 66 | Entity Follow Flag | 属性跟随标志(1=有后续 ATTRIB)Attribute follow (1=has ATTRIBs) |
| 70 | Column Count | 列数(阵列)Column count (array) |
| 71 | Row Count | 行数(阵列)Row count (array) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 70 | Spline Flags | 标志位(1=闭合, 2=周期, 4=平面, 8=线性)Flags (1=closed, 2=periodic, 4=planar, 8=linear) |
| 71 | Degree | 曲线阶数(通常为 3=三次 B 样条)Degree (typically 3=cubic B-spline) |
| 72 | Number of Knots | 节点数Knot count |
| 73 | Number of Control Points | 控制点数Control point count |
| 74 | Number of Fit Points | 拟合点数Fit point count |
| 40 | Knot Value | 节点值(连续出现)Knot value (repeating) |
| 10 | Control Point | 控制点坐标(连续出现)Control point (repeating) |
| 11 | Fit Point | 拟合点坐标(连续出现)Fit point (repeating) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | Center Point | 椭圆中心Ellipse center |
| 11 | Major Axis Endpoint | 长轴端点向量(相对于中心)Major axis endpoint vector (relative to center) |
| 40 | Minor Axis Ratio | 短轴与长轴比值(0<ratio<=1)Minor-to-major axis ratio (0<ratio<=1) |
| 41 | Start Parameter | 起始参数角度Start parameter angle |
| 42 | End Parameter | 终止参数角度End parameter angle |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 2 | Pattern Name | 填充图案名(如 ANSI31, SOLID)Pattern name (e.g. ANSI31, SOLID) |
| 10 | Elevation Point | 标高点(仅实体填充)Elevation point (solid only) |
| 41 | Pattern Scale | 图案缩放比例Pattern scale factor |
| 52 | Pattern Angle | 图案旋转角度Pattern rotation angle |
| 70 | Hatch Style | 填充样式(0=普通, 1=外部, 2=忽略)Hatch style (0=normal, 1=outer, 2=ignore) |
| 71 | Associativity Flag | 关联标志(1=关联)Associativity (1=associative) |
| 75 | Hatch Pattern Type | 图案类型(0=用户定义, 1=预定义, 2=自定义)Pattern type (0=user, 1=predefined, 2=custom) |
| 76 | Boundary Path Count | 边界路径数量Boundary path count |
| 91 | Pattern Definition Lines | 图案定义线数量Pattern definition line count |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 1 | Attribute Value | 属性值 (ATTRIB) / 默认值 (ATTDEF)Value (ATTRIB) / Default (ATTDEF) |
| 2 | Attribute Tag | 属性标记名Attribute tag name |
| 3 | Attribute Prompt | 属性提示文字Attribute prompt text |
| 10 | Insertion Point | 插入点Insertion point |
| 40 | Text Height | 文字高度Text height |
| 41 | Width Factor | 宽度比例因子Width factor |
| 50 | Rotation Angle | 旋转角度Rotation angle |
| 70 | Attribute Flags | 标志(1=不可见, 2=常量, 4=验证, 8=预置)Flags (1=invisible, 2=constant, 4=verify, 8=preset) |
| 73 | Field Length | 字段长度Field length |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | Leader Vertex | 引线顶点坐标(连续出现)Leader vertex (repeating) |
| 71 | Annotation Type | 注释类型(0=无, 1=文字, 2=公差, 3=块参照)Annotation type (0=none, 1=text, 2=tolerance, 3=block) |
| 72 | Path Type | 路径类型Path type |
| 73 | Annotation Placement | 注释放置方式Annotation placement |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | First Corner | 第一角点First corner |
| 11 | Second Corner | 第二角点Second corner |
| 12 | Third Corner | 第三角点Third corner |
| 13 | Fourth Corner | 第四角点(可选)Fourth corner (optional) |
| 70 | Invisible Edge Flags | 不可见边标志(位码:1/2/4/8)Invisible edge flags (bit: 1/2/4/8) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | First Corner | 第一点First point |
| 11 | Second Corner | 第二点Second point |
| 12 | Third Corner | 第三点Third point |
| 13 | Fourth Corner | 第四点(可选,默认=第三点)Fourth point (optional, defaults to 3rd) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | Start Point | 起始顶点坐标Start vertex |
| 11 | Vertex Points | 各顶点坐标(连续出现)Vertices (repeating) |
| 19 | End Point | 终止顶点坐标End vertex |
| 71 | Justification | 对齐方式(0=顶, 1=零, 2=底)Justification (0=top, 1=zero, 2=bottom) |
| 72 | Drawing Flags | 绘制标志(1=闭合, 2=开始截断, 4=结束截断)Flags (1=closed, 2=start cap, 4=end cap) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 1 | Feature Control Frame | 特征控制框架文字Feature control frame text |
| 3 | Feature Control Frame (cont.) | 附加特征控制框架文字(可续接)Additional FCF text (continuation) |
| 10 | Insertion Point | 插入点Insertion point |
| 11 | Leader Vertexes | 引线顶点(连续出现)Leader vertices (repeating) |
| 组码Code | 英文名称English Name | 中文说明Chinese Description |
|---|---|---|
| 10 | Point Location | 点坐标Point coordinates |
| 50 | Angle (for UCS) | 角度(UCS 相关)Angle (UCS related) |
全部实体类型列表Complete Entity Type List
DXF 中所有已定义的图形实体类型(即组码 0 可取的值):All defined graphical entity types in DXF (values for group code 0):
基础几何实体Basic Geometry Entities
LINE POINT CIRCLE ARC ELLIPSE RAY XLINE HELIX
多段线与曲线Polylines & Curves
POLYLINE LWPOLYLINE SPLINE
面与体Faces & Bodies
3DFACE SOLID TRACE 3DSOLID BODY REGION SURFACE MESH
文字与标注Text & Dimensions
TEXT MTEXT DIMENSION ARC_DIMENSION TOLERANCE LEADER MULTILEADER SHAPE
块与属性Blocks & Attributes
INSERT MINSERT ATTRIB ATTDEF BLOCK ENDBLK
填充与图案Hatches & Patterns
HATCH MPOLYGON MLINE
其他Others
VIEWPORT UNDERLAY WIPEOUT ACAD_PROXY_ENTITY LIGHT OFRAME ACAD_TABLE
DXF 文件节结构DXF File Section Structure
DXF 文件由若干节(SECTION)组成,每节以 0 SECTION 开始、0 ENDSEC 结束。组码 2 指定节名。A DXF file consists of several sections. Each starts with 0 SECTION and ends with 0 ENDSEC. Group code 2 specifies the section name.
| 节名Section Name | 英文名称English Name | 中文说明Chinese Description | 关键组码Key Codes |
|---|---|---|---|
HEADER | Header Section | 全局变量定义(版本、精度、坐标系等)Global variable definitions (version, precision, coordinate system) | 9(变量名), 对应变量的值组码9 (var name), variable value codes |
CLASSES | Classes Section | 非内置类定义(C++ 类信息)Non-built-in class definitions (C++ class info) | 100 1 2 |
TABLES | Tables Section | 符号表定义(图层、线型、文字样式、标注样式等)Symbol table definitions (layers, linetypes, text styles, etc.) | 0 2 70 |
BLOCKS | Blocks Section | 块定义,含实体数据Block definitions, containing entity data | 0 2 8 |
ENTITIES | Entities Section | 图形实体数据(核心绘图内容)Graphical entity data (core drawing content) | 0 8 |
OBJECTS | Objects Section | 非图形对象(字典、XRECORD 等)Non-graphical objects (dictionaries, XRECORD, etc.) | 100 0 |
0 SECTION2 HEADER9 $ACADVER1 AC1027...(更多变量)0 ENDSEC0 SECTION2 CLASSES...(类定义)0 ENDSEC...(TABLES, BLOCKS, ENTITIES, OBJECTS)0 EOF
DXF 组码完全参考手册 | 基于 AutoCAD DXF Reference 编制DXF Group Codes Complete Reference | Based on AutoCAD DXF Reference
