From 41255c62bad94ee1e734f5d045ab12b99e087652 Mon Sep 17 00:00:00 2001 From: Stephen Frederick Date: Thu, 12 Nov 2026 17:23:28 -0500 Subject: [PATCH] The dimension style Standard names a text style in R2018 DXF, so a dimension drawn in it has text Every R2018 DXF holds the dimension style `Standard`, and that style now names the text style `Standard`. It named none before. AutoCAD draws no text for a dimension in a style with no text style, so once `Standard` was made current, a dimension a drafter drew in it with `DIMLINEAR` had no text. The new value, group 340 of the style, is the only change, and every R2018 DXF has it. R12 output is unchanged. Co-authored-by: Claude Opus 5.5 --- CHANGELOG.md | 7 +++++++ docs/dimensions.md | 5 ++++- src/dxf-r2018.ts | 9 ++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) 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",