Set Equation
set_equationAdd or change a global variable or dimension equation so one value drives others in a parametric part or assembly, then solve and rebuild the model.
Instructions
Add or change an equation or global variable, so one value drives others (a parametric part).
E.g. Width = 60mm, then D1@Sketch1 = "Width" / 2: changing Width
later resizes the sketch. A name with @ is a dimension of the active
document (list_model_dimensions); any other is a global variable. An
existing equation for name is changed, else one is added; the model
is solved and rebuilt. Applies in all configurations unless
configurations says otherwise. An expression SolidWorks can't use
fails as equation_refused, changing nothing. Needs: an open part or
assembly. Changes: the equation and what it drives. Returns:
equation with name, expression, kind, value (document units),
action (added or changed) and configurations.
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": {
"input_data": "<input_data>"
},
"name": "set_equation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_data | Yes | `name` and `expression` are required; `configurations` defaults to `all`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||