diff --git a/CHANGELOG.md b/CHANGELOG.md index 3160423..a8c9273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## Unreleased + +- The dimension style `Standard`, which every R2018 DXF holds, names the text style + `Standard`. It named none, and AutoCAD draws no text for a dimension in a style with no + text style: once `Standard` was made current, a dimension a drafter drew in it with + `DIMLINEAR` had no text. That one value, group 340 of the style, is new in every R2018 DXF. + ## 0.5.1 This release has breaking changes, though its number is a patch's. A project that depends on diff --git a/docs/dimensions.md b/docs/dimensions.md index 2839b2d..bc93b08 100644 --- a/docs/dimensions.md +++ b/docs/dimensions.md @@ -249,7 +249,10 @@ shown or plotted. It draws nothing for a dimension in the block of another drawi or an insert of the file would show none, and a program that only draws a dimension's block would show none either. -A drawing with no dimension style is written as it was before dimensions. +Every R2018 drawing holds the dimension style `Standard`, with AutoCAD's own values and the +text style `Standard`. AutoCAD draws no text for a dimension in a style that names no text +style, so without it a dimension a drafter adds in `Standard` would have none. A drawing with +no dimension style holds nothing else for dimensions. ## What is not drawn yet diff --git a/src/dxf-r2018.ts b/src/dxf-r2018.ts index 7648e62..9077921 100644 --- a/src/dxf-r2018.ts +++ b/src/dxf-r2018.ts @@ -244,7 +244,14 @@ export function toDXFR2018( ); const arrowheads = arrowheadsWithBlocks(dimensionStyles); writeTable(g, handle, "DIMSTYLE", [ - { type: "DIMSTYLE", subclass: "AcDbDimStyleTableRecord", name: "Standard", handle: handle() }, + { + type: "DIMSTYLE", + subclass: "AcDbDimStyleTableRecord", + name: "Standard", + handle: handle(), + // DIMTXSTY. A dimension in a style with no text style has no text. + fields: (g) => g(340, standardStyle), + }, ...dimensionStyles.map((style) => ({ type: "DIMSTYLE", subclass: "AcDbDimStyleTableRecord",