Undo
drawing_undoRevert the last drawing operation to correct errors or backtrack. Supports both live AutoCAD undo and configurable DXF snapshot history for headless use.
Instructions
Undo the last drawing operation.
On the live COM backend this is AutoCAD's own undo. The headless backend has
no journal, so a step is a full DXF snapshot and history is off by
default — set EZDXF_UNDO_DEPTH to the number of steps you want. Measured
cost of switching it on: 37x on entity creation (0.18 -> 6.65 ms per call).
For a single checkpoint around a risky sequence, transaction_begin /
transaction_rollback is far cheaper.
Drawing something after an undo discards the redo branch, as in AutoCAD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||