execute_code
Execute arbitrary Python code in FreeCAD and get printed output, with an optional screenshot to inspect model changes.
Instructions
Execute arbitrary Python code in FreeCAD.
Args:
code: The Python code to execute.
include_screenshot: Whether to return a screenshot of the model (default True).
Set to False to save tokens when the code does not change the model's
appearance, e.g. analytical or computational scripts whose result is
printed output, or intermediate steps in a longer sequence of changes.
view_name: The view orientation of the returned screenshot (default "Isometric").
Pick the view that best shows the change being made.
Returns:
A message indicating the success or failure of the code execution, the output of the code execution, and a screenshot of the object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| view_name | No | Isometric | |
| include_screenshot | No |