You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DWG save drops dynamic block parameters and actions without warning #3032
Saving a DWG that contains dynamic blocks writes the blocks without their dynamic parameters and actions (for example BLOCKSTRETCHACTION and the parameter objects behind it). CADCraft warns when the file is opened, but nothing is said at save time, and the saved file's blocks are plain static blocks.
Case
A title block contains a revision-log row that is a dynamic block with a stretch action, so a drafter can grow or shrink the row in GstarCAD. After open, edit an attribute, save as DWG and reopen in GstarCAD: the row no longer stretches. The same applies to any dynamic block in a company library.
Request
Write the dynamic-block objects back as read (the block's extension dictionary, parameters, actions and their ACAD_ENHANCEDBLOCK data) when saving DWG and DXF, even if they cannot be edited.
Until then, QSAVE should list them among the content it can't keep (it already asks before other losses, see gaps.md row 1), and save through MCP/CLI should return a warning naming the number of blocks affected.
Related: #1614 (import drops the block record's extension dictionary), #185 and the dynamic-block authoring PRs (#1827, #2169, #2184), gaps F3.
I'd like to work on part 2 of this (a warning at save time that the dynamic block parameters and actions won't be kept). The full write-back in part 1 is bigger, and I'll leave that open.
I couldn't reproduce this on current main: saving as DXF and as DWG keeps dynamic blocks with their parameters and actions (stretch included). The existing test a_saved_drawing_keeps_the_dynamic_block_as_read in crates/io/tests/it/dynblock_read.rs saves a dynamic block both ways, reopens it and gets the same parameters and actions back. So a save warning would be wrong, and I'm releasing my claim.
One gap I noticed: if a file has a dynamic-block object type the DWG writer doesn't know, the bridge leaves it out and counts it (drop_unwritable in craft-dwg), but CADCraft's save never reads that count. @cdwilson127, if your title block still loses its stretch on 0.20.1 or later, could you attach it? That would show whether it uses one of those object types.
A type-specific observation from v0.20.1 on macOS, related to the unsupported-object gap described in the latest comment above. This does not establish that dynamic blocks in general lose their parameters/actions.
In a real drawing workflow on 2026-11-15, app.open returned the following warning for each of two input DWGs:
DWG: 2 objects of types CADCraft doesn't keep were left out (BLOCKPROPERTIESTABLE × 2); saving over the original file would lose them
The corresponding app-reported entity counts were 27,060 and 24,669. The installed native binary reports:
So an open-time warning is present in this case. The concrete compatibility gap is retaining BLOCKPROPERTIESTABLE, rather than an absence of any import warning. We kept the original DWGs and worked on separate outputs.
Our later output has an AC1032 header, and reopening it in CADCraft returned no warnings while the static geometry/layouts and the dimensions we checked survived. That does not prove preservation of the original dynamic-block metadata: the two objects had already been omitted at initial import. We did not validate dynamic lookup/editing behavior in an independent CAD application, and have not retested this object type on current main.
This may be useful as a named object type for a preservation/round-trip regression case alongside the already-supported stretch parameter/action coverage. Until it can be kept, automation needs to retain the original import-loss diagnostics with the delivery; a warning-free reopen of the derived file must not be treated as a lossless original-to-output round trip.
No client DWG or identifying project content is attached. This comment adds a specific observed unsupported type, not a claim on implementing the broader dynamic-block feature.
Visual evidence (anonymized captured logs)
These figures are visual summaries of the captured JSON responses, not application screenshots or before/after AutoCAD renders. They add no claim about a functional comparison in AutoCAD.
Figure 1 — the two import responses and their exact warning
Figure 2 — observed omission versus unverified downstream behavior
The warning strings and entity counts are unchanged from the captured responses; source filenames, local paths, and client drawings are not published. No shareable minimal DWG is included yet.
Correction from me: I retested on 0.21.0 with the title block I reported. A DWG save keeps the dynamic block's 14 objects, stretch action included; only the purge preventer (ACDB_DYNAMICBLOCKPURGEPREVENTER_VERSION) is missing, which #2095 covers. I traced the broken copy I have to a later step in our own tools: the saved class list has 7 repeated class names, and a script using ezdxf dropped repeats, so the proxies pointed at the wrong classes. Sorry for the noise.
Activity
ticket-craft commentedon Nov 10, 2026
Thanks! This ticket describes several separate problems:
It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.
Possibly related: #1614, #1770 and #185.
jayzed80 commentedon Nov 14, 2026
I'd like to work on part 2 of this (a warning at save time that the dynamic block parameters and actions won't be kept). The full write-back in part 1 is bigger, and I'll leave that open.
jayzed80 commentedon Nov 14, 2026
I couldn't reproduce this on current main: saving as DXF and as DWG keeps dynamic blocks with their parameters and actions (stretch included). The existing test
a_saved_drawing_keeps_the_dynamic_block_as_readincrates/io/tests/it/dynblock_read.rssaves a dynamic block both ways, reopens it and gets the same parameters and actions back. So a save warning would be wrong, and I'm releasing my claim.One gap I noticed: if a file has a dynamic-block object type the DWG writer doesn't know, the bridge leaves it out and counts it (
drop_unwritablein craft-dwg), but CADCraft's save never reads that count. @cdwilson127, if your title block still loses its stretch on 0.20.1 or later, could you attach it? That would show whether it uses one of those object types.674345386 commentedon Nov 16, 2026
A type-specific observation from v0.20.1 on macOS, related to the unsupported-object gap described in the latest comment above. This does not establish that dynamic blocks in general lose their parameters/actions.
In a real drawing workflow on 2026-11-15,
app.openreturned the following warning for each of two input DWGs:The corresponding app-reported entity counts were 27,060 and 24,669. The installed native binary reports:
So an open-time warning is present in this case. The concrete compatibility gap is retaining
BLOCKPROPERTIESTABLE, rather than an absence of any import warning. We kept the original DWGs and worked on separate outputs.Our later output has an AC1032 header, and reopening it in CADCraft returned no warnings while the static geometry/layouts and the dimensions we checked survived. That does not prove preservation of the original dynamic-block metadata: the two objects had already been omitted at initial import. We did not validate dynamic lookup/editing behavior in an independent CAD application, and have not retested this object type on current main.
This may be useful as a named object type for a preservation/round-trip regression case alongside the already-supported stretch parameter/action coverage. Until it can be kept, automation needs to retain the original import-loss diagnostics with the delivery; a warning-free reopen of the derived file must not be treated as a lossless original-to-output round trip.
No client DWG or identifying project content is attached. This comment adds a specific observed unsupported type, not a claim on implementing the broader dynamic-block feature.
Visual evidence (anonymized captured logs)
These figures are visual summaries of the captured JSON responses, not application screenshots or before/after AutoCAD renders. They add no claim about a functional comparison in AutoCAD.
Figure 1 — the two import responses and their exact warning
Figure 2 — observed omission versus unverified downstream behavior
Anonymized JSON evidence · Evidence files and SVG downloads
The warning strings and entity counts are unchanged from the captured responses; source filenames, local paths, and client drawings are not published. No shareable minimal DWG is included yet.
cdwilson127 commentedon Dec 1, 2026
Correction from me: I retested on 0.21.0 with the title block I reported. A DWG save keeps the dynamic block's 14 objects, stretch action included; only the purge preventer (ACDB_DYNAMICBLOCKPURGEPREVENTER_VERSION) is missing, which #2095 covers. I traced the broken copy I have to a later step in our own tools: the saved class list has 7 repeated class names, and a script using ezdxf dropped repeats, so the proxies pointed at the wrong classes. Sorry for the noise.