cancel_call
Stops a running Inventor call, such as a long execute_python loop, Content Center scan, or unwanted job. Poll cancelled() in long loops to stop cleanly; grace period then raises KeyboardInterrupt.
Instructions
Stop the running call — a long execute_python loop, a Content Center scan, a job that turned out wrong. cancelled() in execute_python code turns True at once (poll it in long loops to stop cleanly); code that hasn't stopped by itself after CANCEL_GRACE seconds gets a KeyboardInterrupt in the Inventor thread. That takes effect at the next Python line: a call stuck INSIDE one COM call (a long Inventor operation, or a modal dialog) stops only once that call returns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | Which connected Inventor to use (list_instances). Leave empty when only one is connected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |