set_equation
Add or replace a named SolidWorks equation to persist parametric relations, then rebuild and remeasure the model.
Instructions
Add an equation, or replace the one that sets the same name; rebuild and remeasure.
A SolidWorks equation string, e.g. '"D1@BlockExtrude" = 25' or '"D1@BlockExtrude" = 2 * "D1@Sketch1"'. A global variable is '"W" = 40'; link a dimension to it with '"width@Sketch1" = "W"', and set '"W" = 45' again to change it. Persists a relation (unlike set_dimension). Returns the index, whether it replaced one, the features that fail to rebuild (failing_features) and mass properties.
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": {
"equation": "<equation>"
},
"name": "set_equation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| equation | Yes |