execute_code_async
Run background-safe Python code in FreeCAD on a background thread, returning a task_id so you can poll for results without blocking the GUI.
Instructions
Run Python on a background thread and return a task_id; poll the result with get_task_result.
The code must not touch the GUI: no FreeCADGui, views or selection, document objects, recompute or save; use execute_code for those. Output goes through task_print(...); print() is not captured.
Args:
code: Background-safe Python code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |