Set Parameter
set_paramUse this when you need to edit a param() default value in a kernelCAD script. Returns the modified code as text plus diagnostics from re-evaluating the result. Caller persists the new code via standard file-write tools (this tool has no side effects).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The .kcad.ts source code. | |
| new_value | Yes | The new default value. Either a number for a numeric param (e.g. 12.5), or a string expression evaluated in the script (e.g. "width/2 + 3"). | |
| param_name | Yes | The string literal name of the param (first arg to param()). |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||