Layout kit command

style.cell.add

New Cell Style

Creates a table cell style with fill, tint, insets and paragraph style, or from the target cell.

Kit
Layout 0.1.0 (.klayout)
Changes the document
yes

Parameters

Parameters of style.cell.add
NameTypeRequiredDescription
basedOnstringnoread by the command beside its listed parameters
colintegernoread by the command beside its listed parameters
colsinteger[]noinclusive zero-based index range
fillstringno
fromSelectionbooleannothe target cell's look
insetsnumber | number[]no
namestringno
paragraphStylestringno
rowintegernoread by the command beside its listed parameters
rowsinteger[]noinclusive zero-based index range
storyintegernoread by the command beside its listed parameters
strokeobjectno{weight, color, tint?}
tableintegernoread by the command beside its listed parameters
tintnumbernopercent from 0 to 100
vj"top" | "center" | "bottom" | "justify"no

Call through layout_run

text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "style.cell.add" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: basedOn, col, cols, fill, fromSelection, insets, name, paragraphStyle, row, rows, story, stroke, table, tint, vj. 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": {
    "basedOn": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "col": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "cols": {
      "description": "inclusive zero-based index range",
      "items": {
        "type": "integer"
      },
      "maxItems": 2,
      "minItems": 1,
      "type": "array"
    },
    "fill": {
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch"
      ]
    },
    "fromSelection": {
      "description": "the target cell's look",
      "type": "boolean"
    },
    "insets": {
      "oneOf": [
        {
          "description": "points on every side",
          "type": "number"
        },
        {
          "description": "[top, left, bottom, right] points",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "paragraphStyle": {
      "type": "string",
      "x-khp-name": "paragraphName",
      "x-khp-types": [
        "Style"
      ]
    },
    "row": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "rows": {
      "description": "inclusive zero-based index range",
      "items": {
        "type": "integer"
      },
      "maxItems": 2,
      "minItems": 1,
      "type": "array"
    },
    "story": {
      "description": "read by the command beside its listed parameters",
      "type": "integer",
      "x-khp-types": [
        "Story"
      ]
    },
    "stroke": {
      "additionalProperties": true,
      "description": "{weight, color, tint?}",
      "properties": {
        "color": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        },
        "tint": {},
        "weight": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "table": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "tint": {
      "description": "percent from 0 to 100",
      "type": "number"
    },
    "vj": {
      "enum": [
        "top",
        "center",
        "bottom",
        "justify"
      ],
      "type": "string"
    }
  },
  "returns": "{name}",
  "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.