Board kit command
element.duplicate
Duplicate
Copies the elements (with what is inside frames and groups) on the same page, offset by 24 units unless offset says otherwise; answers the copies' ids.
- Kit
- Board 0.1.0 (.kboard)
- Changes the document
- yes
- Acts on
ids(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | yes | The elements |
offset | number[] | object | no | [dx, dy] of the copies (24, 24 by default) |
Call through board_run
text
board_run {
"path": "<file>.kboard",
"steps": [{ "command": "element.duplicate", "params": { "ids": <string[]> } }]
}The required parameters, with placeholders for their types: not a tested example. Optional: offset. board_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": {
"ids": {
"description": "The elements",
"items": {
"type": "string"
},
"type": "array",
"x-khp-types": [
"Element"
]
},
"offset": {
"description": "[dx, dy] of the copies (24, 24 by default)",
"oneOf": [
{
"items": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
"type": "array"
},
{
"additionalProperties": false,
"properties": {
"x": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
"y": {
"description": "One component",
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
}
},
"required": [
"x",
"y"
],
"type": "object"
}
]
}
},
"required": [
"ids"
],
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (board_commands through @kition/[email protected], built from KitionAI/kition-board@e78c190). As data: commands.jsonl.