Drawing Properties (write)
drawing_properties_setWrite SummaryInfo fields and custom properties into a drawing. Only the arguments you pass are touched, and a null value deletes that custom key.
Instructions
Write DWGPROPS fields. Only the arguments given are touched; returns
summary_written, custom_written and custom_deleted (a key that was
never there is not reported deleted).
Refusals, before anything is written: a summary field on the headless
engine (capability: dwgprops — SummaryInfo lives in the DWG, a DXF has
no slot for it; custom properties still work headlessly), a non-string
value (TypeError naming the field or key — nothing is coerced with
str()), an empty custom key, a custom key to write that AutoCAD's
AddCustomInfo would reject mid-write (measured on AutoCAD 2026: leading or
trailing whitespace, or any of the thirteen characters
" * , / : ; < = > ? \ |anywhere in the key; internal spaces, tabs and unicode are fine —ValueErrornaming the key, on both engines; a delete is exempt because RemoveCustomByKey never validates syntax, so a key that reached the drawing another way stays removable), two keys in one request that AutoCAD would call the same key (its key compare is a simple per-character case compare:Project/PROJECTandGrün/GRÜNare one key,Straße/STRASSE are two), a line break in a custom key or value (it corrupts the DXF on save), and headlessly a document older than R2004 (ValueError` — ezdxf only writes the custom-property header pairs
for AC1018+, so they would vanish at save; save as R2004 or newer first).
A key is matched to the drawing by that same rule on both engines and
keeps its stored spelling when updated. On the live engine an exact
spelling is changed with SetCustomByKey; otherwise AutoCAD decides —
AddCustomInfo, and on its 'Duplicate key' SetCustomByKey; a delete is
RemoveCustomByKey, and its 'Key not found' is reported as not deleted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | SummaryInfo Title | |
| author | No | SummaryInfo Author | |
| custom | No | Custom properties to write: {key: text}; a null value deletes the key. Keys not mentioned are left alone. | |
| subject | No | SummaryInfo Subject | |
| comments | No | SummaryInfo Comments | |
| keywords | No | SummaryInfo Keywords |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||