session_rollback
Roll back the model to a previous step, undoing document transactions and truncating the step log to restore an earlier state.
Instructions
Roll back the model to a previous step.
Undoes the corresponding document transactions in FreeCAD and truncates
the step log. Removed steps go to a redo buffer (session_redo) until a new
cad() operation discards them.
Args:
to_step: Keep steps 1..to_step; undo everything after (0 = undo all).
force: Roll back even across non-atomic execute_code steps (risky:
undo may revert the wrong change).
Returns:
JSON with undone count, removed step numbers, post-rollback object
list, and a fingerprint consistency check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| to_step | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |