fusion_execute_python
Execute Python scripts within Autodesk Fusion to automate modeling, assembly, CAM, and inspection tasks. Supports idempotent operations and read-only mode for safe scripted control.
Instructions
Run Python defining run(context) inside Fusion. Supports all installed API namespaces.
Mutations require document id from fusion_inspect and a unique operation_id. Repeat the same id/request to retrieve its prior result without executing again. Exceptions may leave partial changes. Inspect results separately; succeeded means the script returned, not that geometry or machining correctness was verified. Script code is trusted local code, not sandboxed. Use explicit units in scripts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | ||
| read_only | No | ||
| operation_id | No | ||
| expected_document_id | No |