mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-01 18:25:32 -06:00
AutoCAD keeps an annotative object's size at each annotation scale it supports in scale contexts (extension dictionary AcDbContextDataManager, ACDB_ANNOTATIONSCALES, one *OBJECTCONTEXTDATA_CLASS per scale), with the object's own groups at its default scale. CADCraft dropped AutoCAD's contexts on read, so those objects opened as plain text at the default scale's size and lost their scales on save; its own annotative objects went out with only CADCraft's private record, so AutoCAD showed them at one size at every scale. Text, MText and dimensions in model space and layouts are now written at their default scale (the current one when supported) with AcadAnnotative xdata and a context per scale: text insertion and alignment points, MText width and columns, a dimension's text position and a *D block with its geometry at that scale (sharing the DIMASSOC's extension dictionary when there is one). Scales missing from the list are added. Reading takes the scales from the contexts and the sizes back to paper size. Files before the 2007 format keep CADCraft's record as before. The DWG bridge gives acadrust text contexts its way (marker, radians) and dimension contexts' blocks as BLOCK_RECORD handles, and turns them back. Checked in AutoCAD: it opens the output, keeps both contexts of each object, and draws the dimension at 0.18 / 9.0 text height at 1:1 / 1:50. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>