Map Ole2Frame as update-only with the embedded object preserved

Frame corners and the aspect lock are scriptable; the opaque storage and
envelope are excluded and refused on edit. The audit embeds a real PNG
through OCS's own builder and proves it survives DWG and DXF byte-for-byte.
Python creation stays a follow-up.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Felix RiestraandClaude Sonnet 5 committed 2026-09-20 16:43:25 +02:00
1 parent f1813b3ebe
commit e583da83db
10 files changed
+149 -11

No files matched your search

+1 -1
View File
@@ -94,7 +94,7 @@ The host-owned catalog classifies all 48 entity variants and tracks every
traced field, including fields marked `unmapped`. Query it with
`doc.coverage()` or `doc.coverage("Line")`; each row includes source field,
type, access, and current validation status. Geometry edits remain limited to
the 37 mapped kinds.
the 38 mapped kinds.
For any entity, `entity.snapshot` returns a detached dictionary of its raw
CAD fields, including `snapshot["common"]` and kind-specific nested values.
It can inspect an unmapped kind; editing the dictionary does
+28 -1
View File
@@ -36,7 +36,8 @@
"Underlay",
"Viewport",
"ViewBorder",
"Light"
"Light",
"Ole2Frame"
],
"manual_kinds": [
"Dimension"
@@ -780,6 +781,32 @@
"required": true
}
}
},
"Ole2Frame": {
"update_only": true,
"update_only_message": "Ole2Frame cannot be created from a script: its embedded object storage is opaque; existing frames can be moved, resized and aspect-locked, and the stored object is preserved untouched",
"fields": {
"storage": {
"exclude": true,
"_comment": "Opaque compound-file payload; snapshot-readable and preserved untouched."
},
"envelope": {
"exclude": true,
"_comment": "Opaque frame envelope; preserved untouched."
},
"version": {
"read_only": true
},
"source_application": {
"read_only": true
},
"ole_object_type": {
"read_only": true
},
"dwg_mode": {
"read_only": true
}
}
}
}
}
+1 -1
View File
@@ -4780,7 +4780,7 @@ mod tests {
);
}
}
assert_eq!(emitted.len(), 37);
assert_eq!(emitted.len(), 38);
}
#[cfg(feature = "experimental-host-model")]