feat(settings): drawing_properties_get/set — SummaryInfo on COM, custom properties on both engines

Summary fields are refused headlessly with capability dwgprops before any
write; custom properties are $CUSTOMPROPERTYTAG/$CUSTOMPROPERTY pairs and
survive save + reopen. Validation is shared, by name, and never str()-coerces.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
Umut CAN
2026-09-21 16:59:19 +03:00
co-authored by Claude Opus 5
parent 75c13196b9
commit 10a7372ce7
9 changed files with 537 additions and 9 deletions
+25
View File
@@ -72,12 +72,15 @@ class ToolAliases:
# PLINE -- a raw polyline (entity_create_polyline) or a P&ID line run
# between two ports (pid_line_draw), which is an LWPOLYLINE with a
# class, a number and markers; a drafter typing it could mean either.
# DWGPROPS -- one dialog, three tabs: General (drawing_info), Summary and
# Custom (drawing_properties_get / drawing_properties_set).
#
# Every other AutoCAD command must map to exactly one tool.
SHARED_ACAD_COMMANDS: frozenset[str] = frozenset(
{
"ARRAY",
"BLOCK",
"DWGPROPS",
"ERASE",
"INSERT",
"LAYER",
@@ -453,6 +456,28 @@ TOOL_ALIASES: dict[str, ToolAliases] = {
"drawing intent",
),
),
"drawing_properties_get": ToolAliases(
acad=("DWGPROPS",),
synonyms=(
"drawing properties",
"document properties",
"summary info",
"title subject author keywords",
"custom properties",
"who made this drawing",
),
),
"drawing_properties_set": ToolAliases(
acad=("DWGPROPS",),
synonyms=(
"set the drawing title",
"set author and keywords",
"add a custom property",
"project number in the file properties",
"edit summary info",
"delete a custom property",
),
),
"drawing_preflight": ToolAliases(
synonyms=(
"preflight",