Vector kit command

clipboard.importSvg

Load SVG into Clipboard

Replaces the kit's clipboard with the objects of SVG markup or SVG/SVGZ bytes, centred on center; run edit.pasteInPlace afterwards to place them.

Kit
Vector 0.1.0 (.kvector)
Changes the document
no

Parameters

Parameters of clipboard.importSvg
NameTypeRequiredDescription
centernumber[]no
dataBase64stringnoSVG or SVGZ bytes; one of several alternative parameters
formatstringnoread by the command beside its listed parameters
idsany[]noread by the command beside its listed parameters
svgstringno

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "clipboard.importSvg" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: center, dataBase64, format, ids, svg. vector_run answers the step’s result in completed[i].result.

Result

Result of clipboard.importSvg
NameTypeRequiredDescription
countnumberno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "count": {
      "type": "number"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "center": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "dataBase64": {
      "description": "SVG or SVGZ bytes; one of several alternative parameters",
      "type": "string"
    },
    "format": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "ids": {
      "description": "read by the command beside its listed parameters",
      "type": "array"
    },
    "svg": {
      "type": "string"
    }
  },
  "returns": "{count}; then run edit.pasteInPlace",
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.