Layout kit command
object.caption
Generate Static Caption
Generates a static caption below objects from a template with variables such as {name} and {altText}.
- Kit
- Layout 0.1.0 (.klayout)
- Changes the document
- yes
- Acts on
ids(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
height | number | no | pt, 24 |
ids | (integer | string)[] | no | |
live | boolean | no | kept current as the source changes |
offset | number | no | pt, 0 |
position | "below" | "above" | "left" | "right" | no | |
style | string | no | |
text | string | no | a caption template such as {name} |
Call through layout_run
text
layout_run {
"path": "<file>.klayout",
"steps": [{ "command": "object.caption" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: height, ids, live, offset, position, style, text. layout_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": {
"height": {
"description": "pt, 24",
"type": "number"
},
"ids": {
"items": {
"description": "an id",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"type": "array",
"x-khp-types": [
"Item"
]
},
"live": {
"description": "kept current as the source changes",
"type": "boolean"
},
"offset": {
"description": "pt, 0",
"type": "number"
},
"position": {
"enum": [
"below",
"above",
"left",
"right"
],
"type": "string"
},
"style": {
"type": "string",
"x-khp-name": "paragraphName",
"x-khp-types": [
"Style"
]
},
"text": {
"description": "a caption template such as {name}",
"type": "string"
}
},
"returns": "{ids}",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (layout_commands through @kition/[email protected], built from KitionAI/kition-layout@8767a18). As data: commands.jsonl.