DIMSTYLE Table¶
The DIMSTYLE table stores all dimension style definitions of a DXF drawing.
You have access to the dimension styles table by the attribute Drawing.dimstyles
.
See also
DXF Reference: TABLES Section
DXF Reference: DIMSTYLE Table
Table Structure DXF R12¶
0 <<< start of table
TABLE
2 <<< set table type
DIMSTYLE
70 <<< count of line types defined in this table, AutoCAD ignores this value
9
0 <<< 1. DIMSTYLE table entry
DIMSTYLE
<<< DIMSTYLE data tags
0 <<< 2. DIMSTYLE table entry
DIMSTYLE
<<< DIMSTYLE data tags and so on
0 <<< end of DIMSTYLE table
ENDTAB
DIMSTYLE Entry DXF R12¶
DIMSTYLE Variables DXF R12¶
Source: CADDManager Blog
DIMVAR |
Code |
Description |
---|---|---|
DIMALT |
170 |
Controls the display of alternate units in dimensions. |
DIMALTD |
171 |
Controls the number of decimal places in alternate units. If DIMALT is turned on, DIMALTD sets the number of digits displayed to the right of the decimal point in the alternate measurement. |
DIMALTF |
143 |
Controls the multiplier for alternate units. If DIMALT is turned on, DIMALTF multiplies linear dimensions by a factor to produce a value in an alternate system of measurement. The initial value represents the number of millimeters in an inch. |
DIMAPOST |
4 |
Specifies a text prefix or suffix (or both) to the alternate dimension measurement for all types of dimensions except angular. For instance, if the current units are Architectural, DIMALT is on, DIMALTF is 25.4 (the number of millimeters per inch), DIMALTD is 2, and DIMPOST is set to “mm”, a distance of 10 units would be displayed as 10”[254.00mm]. |
DIMASZ |
41 |
Controls the size of dimension line and leader line arrowheads. Also controls the size of hook lines. Multiples of the arrowhead size determine whether dimension lines and text should fit between the extension lines. DIMASZ is also used to scale arrowhead blocks if set by DIMBLK. DIMASZ has no effect when DIMTSZ is other than zero. |
DIMBLK |
5 |
Sets the arrowhead block displayed at the ends of dimension lines. |
DIMBLK1 |
6 |
Sets the arrowhead for the first end of the dimension line when DIMSAH is 1. |
DIMBLK2 |
7 |
Sets the arrowhead for the second end of the dimension line when DIMSAH is 1. |
DIMCEN |
141 |
Controls drawing of circle or arc center marks and centerlines by the DIMCENTER, DIMDIAMETER, and DIMRADIUS commands. For DIMDIAMETER and DIMRADIUS, the center mark is drawn only if you place the dimension line outside the circle or arc.
|
DIMCLRD |
176 |
Assigns colors to dimension lines, arrowheads, and dimension leader lines.
|
DIMCLRE |
177 |
Assigns colors to dimension extension lines, values like DIMCLRD |
DIMCLRT |
178 |
Assigns colors to dimension text, values like DIMCLRD |
DIMDLE |
46 |
Sets the distance the dimension line extends beyond the extension line when oblique strokes are drawn instead of arrowheads. |
DIMDLI |
43 |
Controls the spacing of the dimension lines in baseline dimensions. Each dimension line is offset from the previous one by this amount, if necessary, to avoid drawing over it. Changes made with DIMDLI are not applied to existing dimensions. |
DIMEXE |
44 |
Specifies how far to extend the extension line beyond the dimension line. |
DIMEXO |
42 |
Specifies how far extension lines are offset from origin points. With fixed-length extension lines, this value determines the minimum offset. |
DIMGAP |
147 |
Sets the distance around the dimension text when the dimension line breaks to accommodate dimension text. Also sets the gap between annotation and a hook line created with the LEADER command. If you enter a negative value, DIMGAP places a box around the dimension text. DIMGAP is also used as the minimum length for pieces of the dimension line. When the default position for the dimension text is calculated, text is positioned inside the extension lines only if doing so breaks the dimension lines into two segments at least as long as DIMGAP. Text placed above or below the dimension line is moved inside only if there is room for the arrowheads, dimension text, and a margin between them at least as large as DIMGAP: 2 * (DIMASZ + DIMGAP). |
DIMLFAC |
144 |
Sets a scale factor for linear dimension measurements. All linear dimension distances, including radii, diameters, and coordinates, are multiplied by DIMLFAC before being converted to dimension text. Positive values of DIMLFAC are applied to dimensions in both modelspace and paperspace; negative values are applied to paperspace only. DIMLFAC applies primarily to nonassociative dimensions (DIMASSOC set 0 or 1). For nonassociative dimensions in paperspace, DIMLFAC must be set individually for each layout viewport to accommodate viewport scaling. DIMLFAC has no effect on angular dimensions, and is not applied to the values held in DIMRND, DIMTM, or DIMTP. |
DIMLIM |
72 |
Generates dimension limits as the default text. Setting DIMLIM to On turns DIMTOL off.
|
DIMPOST |
3 |
Specifies a text prefix or suffix (or both) to the dimension measurement. For example, to establish a suffix for millimeters, set DIMPOST to mm; a distance of 19.2 units would be displayed as 19.2 mm. If tolerances are turned on, the suffix is applied to the tolerances as well as to the main dimension. Use “<>” to indicate placement of the text in relation to the dimension value. For example, enter “<>mm” to display a 5.0 millimeter radial dimension as “5.0mm”. If you entered mm “<>”, the dimension would be displayed as “mm 5.0”. |
DIMRND |
45 |
Rounds all dimensioning distances to the specified value. For instance, if DIMRND is set to 0.25, all distances round to the nearest 0.25 unit. If you set DIMRND to 1.0, all distances round to the nearest integer. Note that the number of digits edited after the decimal point depends on the precision set by DIMDEC. DIMRND does not apply to angular dimensions. |
DIMSAH |
173 |
Controls the display of dimension line arrowhead blocks.
|
DIMSCALE |
40 |
Sets the overall scale factor applied to dimensioning variables that specify sizes, distances, or offsets. Also affects the leader objects with the LEADER command. Use MLEADERSCALE to scale multileader objects created with the MLEADER command.
DIMSCALE does not affect measured lengths, coordinates, or angles. Use DIMSCALE to control the overall scale of dimensions. However, if the current dimension style is annotative, DIMSCALE is automatically set to zero and the dimension scale is controlled by the CANNOSCALE system variable. DIMSCALE cannot be set to a non-zero value when using annotative dimensions. |
DIMSE1 |
75 |
Suppresses display of the first extension line.
|
DIMSE2 |
76 |
Suppresses display of the second extension line.
|
DIMSOXD |
175 |
Suppresses arrowheads if not enough space is available inside the extension lines.
If not enough space is available inside the extension lines and DIMTIX is on, setting DIMSOXD to On suppresses the arrowheads. If DIMTIX is off, DIMSOXD has no effect. |
DIMTAD |
77 |
Controls the vertical position of text in relation to the dimension line.
|
DIMTFAC |
146 |
Specifies a scale factor for the text height of fractions and tolerance values relative to the dimension text height, as set by DIMTXT. For example, if DIMTFAC is set to 1.0, the text height of fractions and tolerances is the same height as the dimension text. If DIMTFAC is set to 0.7500, the text height of fractions and tolerances is three-quarters the size of dimension text. |
DIMTIH |
73 |
Controls the position of dimension text inside the extension lines for all dimension types except Ordinate.
|
DIMTIX |
174 |
Draws text between extension lines.
|
DIMTM |
48 |
Sets the minimum (or lower) tolerance limit for dimension text when DIMTOL or DIMLIM is on. DIMTM accepts signed values. If DIMTOL is on and DIMTP and DIMTM are set to the same value, a tolerance value is drawn. If DIMTM and DIMTP values differ, the upper tolerance is drawn above the lower, and a plus sign is added to the DIMTP value if it is positive. For DIMTM, the program uses the negative of the value you enter (adding a minus sign if you specify a positive number and a plus sign if you specify a negative number). |
DIMTOFL |
172 |
Controls whether a dimension line is drawn between the extension lines even when the text is placed outside. For radius and diameter dimensions (when DIMTIX is off), draws a dimension line inside the circle or arc and places the text, arrowheads, and leader outside.
|
DIMTOH |
74 |
Controls the position of dimension text outside the extension lines.
|
DIMTOL |
71 |
Appends tolerances to dimension text. Setting DIMTOL to on turns DIMLIM off. |
DIMTP |
47 |
Sets the maximum (or upper) tolerance limit for dimension text when DIMTOL or DIMLIM is on. DIMTP accepts signed values. If DIMTOL is on and DIMTP and DIMTM are set to the same value, a tolerance value is drawn. If DIMTM and DIMTP values differ, the upper tolerance is drawn above the lower and a plus sign is added to the DIMTP value if it is positive. |
DIMTSZ |
142 |
Specifies the size of oblique strokes drawn instead of arrowheads for linear, radius, and diameter dimensioning.
|
DIMTVP |
145 |
Controls the vertical position of dimension text above or below the dimension line. The DIMTVP value is used when DIMTAD = 0. The magnitude of the vertical offset of text is the product of the text height and DIMTVP. Setting DIMTVP to 1.0 is equivalent to setting DIMTAD = 1. The dimension line splits to accommodate the text only if the absolute value of DIMTVP is less than 0.7. |
DIMTXT |
140 |
Specifies the height of dimension text, unless the current text style has a fixed height. |
DIMZIN |
78 |
Controls the suppression of zeros in the primary unit value. Values 0-3 affect feet-and-inch dimensions only:
|
Table Structure DXF R2000+¶
0 <<< start of table
TABLE
2 <<< set table type
DIMSTYLE
5 <<< DIMSTYLE table handle
5F
330 <<< owner tag, tables has no owner
0
100 <<< subclass marker
AcDbSymbolTable
70 <<< count of dimension styles defined in this table, AutoCAD ignores this value
9
0 <<< 1. DIMSTYLE table entry
DIMSTYLE
<<< DIMSTYLE data tags
0 <<< 2. DIMSTYLE table entry
DIMSTYLE
<<< DIMSTYLE data tags and so on
0 <<< end of DIMSTYLE table
ENDTAB
Additional DIMSTYLE Variables DXF R13/14¶
Source: CADDManager Blog
DIMVAR |
code |
Description |
---|---|---|
DIMADEC |
179 |
Controls the number of precision places displayed in angular dimensions. |
DIMALTTD |
274 |
Sets the number of decimal places for the tolerance values in the alternate units of a dimension. |
DIMALTTZ |
286 |
Controls suppression of zeros in tolerance values. |
DIMALTU |
273 |
Sets the units format for alternate units of all dimension substyles except Angular. |
DIMALTZ |
285 |
Controls the suppression of zeros for alternate unit dimension values. DIMALTZ values 0-3 affect feet-and-inch dimensions only. |
DIMAUNIT |
275 |
Sets the units format for angular dimensions.
|
DIMBLK_HANDLE |
342 |
defines DIMBLK as handle to the BLOCK RECORD entry |
DIMBLK1_HANDLE |
343 |
defines DIMBLK1 as handle to the BLOCK RECORD entry |
DIMBLK2_HANDLE |
344 |
defines DIMBLK2 as handle to the BLOCK RECORD entry |
DIMDEC |
271 |
Sets the number of decimal places displayed for the primary units of a dimension. The precision is based on the units or angle format you have selected. |
DIMDSEP |
278 |
Specifies a single-character decimal separator to use when creating dimensions whose unit format is decimal. When prompted, enter a single character at the Command prompt. If dimension units is set to Decimal, the DIMDSEP character is used instead of the default decimal point. If DIMDSEP is set to NULL (default value, reset by entering a period), the decimal point is used as the dimension separator. |
DIMJUST |
280 |
Controls the horizontal positioning of dimension text.
|
DIMSD1 |
281 |
Controls suppression of the first dimension line and arrowhead. When turned on, suppresses the display of the dimension line and arrowhead between the first extension line and the text.
|
DIMSD2 |
282 |
Controls suppression of the second dimension line and arrowhead. When turned on, suppresses the display of the dimension line and arrowhead between the second extension line and the text.
|
DIMTDEC |
272 |
Sets the number of decimal places to display in tolerance values for the primary units in a dimension. This system variable has no effect unless DIMTOL is set to On. The default for DIMTOL is Off. |
DIMTOLJ |
283 |
Sets the vertical justification for tolerance values relative to the nominal dimension text. This system variable has no effect unless DIMTOL is set to On. The default for DIMTOL is Off.
|
DIMTXSTY_HANDLE |
340 |
Specifies the text style of the dimension as handle to STYLE table entry |
DIMTZIN |
284 |
Controls the suppression of zeros in tolerance values. Values 0-3 affect feet-and-inch dimensions only.
|
DIMUPT |
288 |
Controls options for user-positioned text.
|
Additional DIMSTYLE Variables DXF R2000¶
Source: CADDManager Blog
DIMVAR |
Code |
Description |
---|---|---|
DIMALTRND |
148 |
Rounds off the alternate dimension units. |
DIMATFIT |
289 |
Determines how dimension text and arrows are arranged when space is not sufficient to place both within the extension lines.
A leader is added to moved dimension text when DIMTMOVE is set to 1. |
DIMAZIN |
79 |
Suppresses zeros for angular dimensions.
|
DIMFRAC |
276 |
Sets the fraction format when DIMLUNIT is set to 4 (Architectural) or 5 (Fractional).
|
DIMLDRBLK_HANDLE |
341 |
Specifies the arrow type for leaders. Handle to BLOCK RECORD |
DIMLUNIT |
277 |
Sets units for all dimension types except Angular.
|
DIMLWD |
371 |
Assigns lineweight to dimension lines.
|
DIMLWE |
372 |
Assigns lineweight to extension lines.
|
DIMTMOVE |
279 |
Sets dimension text movement rules.
|
Text Location¶
This image shows the default text locations created by BricsCAD for dimension variables dimtad
and dimjust
:
Unofficial DIMSTYLE Variables for DXF R2007 and later¶
The following DIMVARS are not documented in the DXF Reference by Autodesk.
DIMVAR |
Code |
Description |
---|---|---|
DIMTFILL |
69 |
Text fill 0=off; 1=background color; 2=custom color (see DIMTFILLCLR) |
DIMTFILLCLR |
70 |
Text fill custom color as color index |
DIMFXLON |
290 |
Extension line has fixed length if set to 1 |
DIMFXL |
49 |
Length of extension line below dimension line if fixed (DIMFXLON is 1), DIMEXE defines the the length above the dimension line |
DIMJOGANG |
50 |
Angle of oblique dimension line segment in jogged radius dimension |
DIMLTYPE_HANDLE |
345 |
Specifies the LINETYPE of the dimension line. Handle to LTYPE table entry |
DIMLTEX1_HANDLE |
346 |
Specifies the LINETYPE of the extension line 1. Handle to LTYPE table entry |
DIMLTEX2_HANDLE |
347 |
Specifies the LINETYPE of the extension line 2. Handle to LTYPE table entry |
Extended Settings as Special XDATA Groups¶
Prior to DXF R2007, some extended settings for the dimension and the extension lines are stored in the XDATA section by following entries, this is not documented by Autodesk:
1001
ACAD_DSTYLE_DIM_LINETYPE <<< linetype for dimension line
1070
380 <<< group code, which differs from R2007 DIMDLTYPE
1005
FFFF <<< handle to LTYPE entry
1001
ACAD_DSTYLE_DIM_EXT1_LINETYPE <<< linetype for extension line 1
1070
381 <<< group code, which differs from R2007 DIMLTEX1
1005
FFFF <<< handle to LTYPE entry
1001
ACAD_DSTYLE_DIM_EXT2_LINETYPE <<< linetype for extension line 1
1070
382 <<< group code, which differs from R2007 DIMLTEX2
1005
FFFF <<< handle to LTYPE entry
1001
ACAD_DSTYLE_DIMEXT_ENABLED <<< extension line fixed
1070
383 <<< group code, which differs from R2007 DIMEXFIX
1070
1 <<< fixed if 1 else 0
1001
ACAD_DSTYLE_DIMEXT_LENGTH <<< extension line fixed length
1070
378 <<< group code, which differs from R2007 DIMEXLEN
1040
1.33 <<< length of extension line below dimension line
This XDATA groups requires also an appropriate APPID entry in the APPID table. This feature is not supported by ezdxf.