Undo One Step
Execute one undo action on the active SolidWorks document.
Prerequisites
- SolidWorks is running
- A document is open and active (
.sldprt,.sldasm, or.slddrw)
What this Skill does
- Connects to the running SolidWorks instance
- Gets the active document
- Calls
IModelDoc2.EditUndo2(1) - Redraws graphics
When to use
- You want Ctrl+Z behavior in automation
- You just ran a tool and need to revert one step
- You need a deterministic one-step rollback command
Quick start
dotnet run --project ./sup_tools/swpilotcli-undo-one-step/scripts/UndoOneStep/SolidWorksConsole.csproj
Expected output:
Undo executed: 1 step.
Reference
See API_REFERENCE.md for return codes and API details.
Notes
- This tool always undoes exactly one step
- The exact effect depends on current SolidWorks undo stack state