fix(task-19): a .dxf template really reaches the live seat; the fallback dimvars land on Standard
Documents.Add(<file>) accepts only a genuine DWT. Measured on AutoCAD 2026: Add(templates/iso_a3_pid.dxf) returned the default acadiso drawing (layers ['0'], Layout1/Layout2) exactly as Add() and Add(<missing.dwt>) did, so drawing_new(template=<bundled name>) reported ok:true with source 'bundled_dxf' over a blank document, and the explicit .dxf path route was just as blank. ComBackend.drawing_new now converts any non-.dwt template through AutoCAD itself (Documents.Open read-only -> SaveAs ac2018_Template, older constants tried next -> Close(False)), caches the .dwt in the temp folder keyed on path/size/mtime, hands Add the .dwt, and refuses a missing template file instead of letting Add default silently. The tool result carries template.dwt / template.dwt_cached. Re-measured end to end through server.drawing_new on the real ComBackend: ansi_b_mech -> 11 layers, tab B, DIMTAD 0 / DIMTIH 1 / DIMEXO 1.5; iso_a3_pid -> 17 layers, tab A3, second call reuses the cached .dwt (0.8 s conversion once). Fake-ActiveX tests pin the call shape and that the conversion document never stays open. Headlessly the build's fallback wrote spec 4.1 only as header DIM variables, and the renderer folds six of them, so DIMTAD/TIH/TOH/EXE/EXO/GAP/LUNIT/LWD were a no-op: ansi_b_mech dimensioned with ISO text placement while system_get_variable and AutoCAD said ANSI. The fallback now also stores each value on the Standard dimstyle; the five DXFs are rebuilt (--check passes) and a test reads the effective values off a DIMENSION drawn from each template and asserts header and style agree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
co-authored by
Claude Opus 5
parent
a76d9e08a3
commit
17f7228fd6
+14
-14
@@ -489,7 +489,7 @@ $SKPOLY
|
||||
9
|
||||
$TDCREATE
|
||||
40
|
||||
2461305.9168518516
|
||||
2461305.9345486113
|
||||
9
|
||||
$TDUCREATE
|
||||
40
|
||||
@@ -497,7 +497,7 @@ $TDUCREATE
|
||||
9
|
||||
$TDUPDATE
|
||||
40
|
||||
2461305.9168518516
|
||||
2461305.9345486113
|
||||
9
|
||||
$TDUUPDATE
|
||||
40
|
||||
@@ -929,11 +929,11 @@ $PSTYLEMODE
|
||||
9
|
||||
$FINGERPRINTGUID
|
||||
2
|
||||
{5DBCBFFD-85BB-4756-97CD-DF14393BA48D}
|
||||
{EA8DAB3B-221B-4973-A128-0F97D36F69C3}
|
||||
9
|
||||
$VERSIONGUID
|
||||
2
|
||||
{8BCC5654-8976-41B9-B27D-2DE6DFEDDA75}
|
||||
{41F085E9-E128-43F7-931E-FEE570A4F621}
|
||||
9
|
||||
$EXTNAMES
|
||||
290
|
||||
@@ -2157,13 +2157,13 @@ Standard
|
||||
40
|
||||
1.0
|
||||
41
|
||||
2.5
|
||||
3.0
|
||||
42
|
||||
0.625
|
||||
1.5
|
||||
43
|
||||
3.75
|
||||
44
|
||||
1.25
|
||||
1.5
|
||||
45
|
||||
0.0
|
||||
46
|
||||
@@ -2175,7 +2175,7 @@ Standard
|
||||
49
|
||||
2.5
|
||||
140
|
||||
2.5
|
||||
3.0
|
||||
141
|
||||
2.5
|
||||
142
|
||||
@@ -2189,7 +2189,7 @@ Standard
|
||||
146
|
||||
1.0
|
||||
147
|
||||
0.625
|
||||
1.0
|
||||
148
|
||||
0.0
|
||||
69
|
||||
@@ -2201,15 +2201,15 @@ Standard
|
||||
72
|
||||
0
|
||||
73
|
||||
0
|
||||
1
|
||||
74
|
||||
0
|
||||
1
|
||||
75
|
||||
0
|
||||
76
|
||||
0
|
||||
77
|
||||
1
|
||||
0
|
||||
78
|
||||
8
|
||||
79
|
||||
@@ -3425,7 +3425,7 @@ DictionaryVariables
|
||||
280
|
||||
0
|
||||
1
|
||||
1.4.4 @ 2026-09-21T19:00:16.265081+00:00
|
||||
1.4.4 @ 2026-09-21T19:25:45.818106+00:00
|
||||
0
|
||||
DICTIONARYVAR
|
||||
5
|
||||
@@ -3437,7 +3437,7 @@ DictionaryVariables
|
||||
280
|
||||
0
|
||||
1
|
||||
1.4.4 @ 2026-09-21T19:00:16.272301+00:00
|
||||
1.4.4 @ 2026-09-21T19:25:45.824109+00:00
|
||||
0
|
||||
ENDSEC
|
||||
0
|
||||
|
||||
Reference in New Issue
Block a user