set_global_variable
Update an existing global variable's value and optionally its units; all linked dimensions rebuild automatically.
Instructions
Modificar una variable global existente — actualiza el valor de A, B, C después de haberla creado. Todas las dimensiones ligadas (vía ecuación) se reconstruyen automáticamente.
Uso típico CSWA: tras construir el Tool Block con A=10, B=20, C=30, cambia a A=12, B=22, C=32 antes de leer la masa nueva.
[en: Modify an existing global variable — updates the value of A, B, C after creation. All dimensions bound to it (via equation) rebuild automatically.]
Args: name: The existing variable name (must already exist). new_value: New numeric value in the specified units. units: Optional. If omitted, the previously-set units are preserved. Pass "mm" / "deg" / "raw" to change unit type.
Returns the updated GlobalVariable dict.
Raises ValueError if the variable doesn't exist (call add_global_variable first).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| units | No | ||
| new_value | Yes |