Set variables
variables_setCreate or update part variables and bind feature parameters to them in a parametric model, with verification and a single-step undo if changes fail.
Instructions
Create/change part variables and bind feature parameters to them (parametric model). Returns a receipt: created object handles, volume/mass before and after, backup path. The whole call is ONE Ctrl+Z for the user; if verification fails the model is restored and VERIFY_FAILED is returned.
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": {
"doc": "<doc>",
"items": "<items>"
},
"name": "variables_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Document handle from doc_list/doc_open, e.g. 'doc:12001:0a1b2c3d' | |
| items | Yes | [{name, value? | expr?, note?, obj?, tolerance?}]. Without obj: part variable (created if missing; latin meaningful name, Russian note). With obj: an existing feature variable gets expr, e.g. 'H', 'D/2'. tolerance (feature variables with can_have_tolerance only, e.g. a hole's diameter): a field like 'H7'/'h6' — deviations are taken from KOMPAS's tolerance table for the variable's value — or {upper, lower} in mm; null removes it. |