batch
Run multiple SolidWorks modelling tools in one ordered call to cut round trips; a failed step rolls back only itself while earlier steps stay applied.
Instructions
Run several tools in one call, in order: one round trip instead of many.
steps: [{"tool": "open_part", "args": {"path": "..."}},
{"tool": "set_dimension", "args": {"dimension_name": "D1@Boss", "value_mm": 12}},
{"tool": "save_part", "args": {}}, {"tool": "close_part"}]
Any tool except batch, stop_python, answer_dialog and list_dialogs. Each step
is guarded as on its own: a failed step leaves the part as it was before
that step; earlier steps stay done. With stop_on_error (default) the batch
stops at the first failure and reports failed_step and the documents
still open, so a part opened by the batch can be closed. A step held by a
modal dialog fails the batch with call_on_hold: answer_dialog then returns
that step's result only; send the remaining steps again. detail "last"
(default) gives the last step's full result and, for the others, volume
and bounding box instead of the full mass properties; "all" gives every
result in full. Check the numbers of every step as you would one by one.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"steps": "<steps>"
},
"name": "batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | ||
| detail | No | last | |
| stop_on_error | No |