Skip to content

fix(dxf): a DIMSTYLE record inherits the header value of an omitted code - #1251

Open
simonedd wants to merge 1 commit into
DomCR:masterfrom
simonedd:fix/dimstyle-header-defaults
Open

simonedd wants to merge 1 commit into
DomCR:masterfrom
simonedd:fix/dimstyle-header-defaults

Conversation

@simonedd

@simonedd simonedd commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The DIMSTYLE record is now seeded with the header variables so that only the codes actually present in the file overwrite them.

@DomCR

DomCR commented Sep 15, 2026 •

Copy link
Copy Markdown
Owner

Hi @simonedd,

You are setting the dimensions using the override, not the default dimension, I'm not sure that this is the right behavior.

@simonedd

Copy link
Copy Markdown
Contributor Author

Hi @DomCR,

I think the property name is misleading here: CadHeader.DimensionstyleOverrides is not a DSTYLE
override, it is the storage of the header dimension variables themselves. I use them as default
values instead of the hard-coded DimensionStyle ones.

My case: a DXF whose DIMSTYLE record omits 78 (DIMZIN) and 272 (DIMTDEC), while the header has $DIMZIN 0 and $DIMTDEC 4. We read those two back as 8 and 2, the class hard-coded defaults; ODA reads them as 0 and 4.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants