Design kit command

data.fill

Fill copies with data

Repeats a frame once per data row, filling named text layers, fills and visibility from each row.

Kit
Design 0.1.0 (.kdesign)
Changes the document
yes
Acts on
id (one id), which a run step’s on fills

Parameters

Parameters of data.fill
NameTypeRequiredDescription
dir"right" | "down"no
formatobjectno
formatsobjectno
gapnumberno
idinteger | stringnoan id; the frame to repeat
rowsobject[]no#rrggbb; true or text.fit's {maxLines?, minSize?, orphans?}: size the text to its box; the copy's name; every layer with that name in the copy; up to 500 rows
scalenumbernodefault 1

Call through design_run

text
design_run {
  "path": "<file>.kdesign",
  "steps": [{ "command": "data.fill" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: dir, format, formats, gap, id, rows, scale. 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": {
    "dir": {
      "enum": [
        "right",
        "down"
      ],
      "type": "string"
    },
    "format": {
      "additionalProperties": true,
      "type": "object"
    },
    "formats": {
      "additionalProperties": true,
      "type": "object"
    },
    "gap": {
      "type": "number"
    },
    "id": {
      "description": "an id; the frame to repeat",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "rows": {
      "description": "#rrggbb; true or text.fit's {maxLines?, minSize?, orphans?}: size the text to its box; the copy's name; every layer with that name in the copy; up to 500 rows",
      "items": {
        "additionalProperties": true,
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "scale": {
      "description": "default 1",
      "type": "number"
    }
  },
  "returns": "{ids (the copies, in row order), missing (keys no layer is named), files? (paths written, one per copy: same file names get a numbered suffix), errors? ([{id, path, error}] for exports that failed; the copies stay)}",
  "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.