forked from 1b-agent/opencadstudio-upstream
Civil3D/AEC objects (and raw MLEADER/Surface records, EED) can only be written losslessly in their source DWG version. On save, fall back to the source version when the chosen version is an incompatible encoding family (acadrust CadDocument::has_version_locked_data), with a command-line notice, across every save path (Save, Save As, save-before-close/quit) via a shared dwg_save_version helper. Default the Save-As format dropdown to the loaded file's version so a round-trip preserves it. Picks up acadrust DWG-writer conformance fixes (3dbae05) so a Civil3D R2004 drawing round-trips through OCS and opens in AutoCAD with no errors. Co-Authored-By: Claude Opus 4.8 <[email protected]>