Layout kit command

edit.findObjects

Find Object

Finds and selects objects by fill, stroke, weight, opacity and kind; answers their ids.

Kit
Layout 0.1.0 (.klayout)
Changes the document
yes

Parameters

Parameters of edit.findObjects
NameTypeRequiredDescription
fillstringno
kind"text" | "graphic" | "shape" | "line" | "group"no
labelstringno
layerintegerno
opacitynumberno0–1
selectbooleannodefault true
strokestringno
strokeWeightnumberno

Call through layout_run

text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "edit.findObjects" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: fill, kind, label, layer, opacity, select, stroke, strokeWeight. 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": {
    "fill": {
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch"
      ]
    },
    "kind": {
      "enum": [
        "text",
        "graphic",
        "shape",
        "line",
        "group"
      ],
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "layer": {
      "type": "integer",
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "opacity": {
      "description": "0–1",
      "type": "number"
    },
    "select": {
      "description": "default true",
      "type": "boolean"
    },
    "stroke": {
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch"
      ]
    },
    "strokeWeight": {
      "type": "number"
    }
  },
  "returns": "{ids} — Find/Change › Object, through the document",
  "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.