Design kit command
variable.add
Create variable
Creates a colour, number, string or boolean variable in a collection with values per mode; answers its id.
- Kit
- Design 0.1.0 (.kdesign)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
collection | integer | string | no | an id (a number, or its digits as text) |
description | string | no | |
name | string | no | |
type | "color" | "number" | "string" | "boolean" | no | |
value | any | no | |
values | object | no | instead of value: one per mode |
Call through design_run
text
design_run {
"path": "<file>.kdesign",
"steps": [{ "command": "variable.add" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: collection, description, name, type, value, values. design_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"collection": {
"description": "an id (a number, or its digits as text)",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-khp-name": "name",
"x-khp-types": [
"Collection"
]
},
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"color",
"number",
"string",
"boolean"
],
"type": "string"
},
"value": {},
"values": {
"additionalProperties": true,
"description": "instead of value: one per mode",
"properties": {
"modeName": {}
},
"type": "object"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (design_commands through @kition/[email protected], built from KitionAI/kition-design@abc7e16). As data: commands.jsonl.