Vector kit command

select.magicWand

Magic Wand

Selects objects similar to object id by the Magic Wand settings (fill, stroke, weight, opacity, blend), replacing, adding to or subtracting from the selection; answers the count.

Kit
Vector 0.1.0 (.kvector)
Changes the document
no
Acts on
id (one id), which a run step’s on fills

Parameters

Parameters of select.magicWand
NameTypeRequiredDescription
idintegernoobject ID
mode"set" | "add" | "subtract"no
resetbooleannoread by the command beside its listed parameters

Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: id, mode, reset. vector_run answers the step’s result in completed[i].result.

Result

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

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "mode": {
      "enum": [
        "set",
        "add",
        "subtract"
      ],
      "type": "string"
    },
    "reset": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    }
  },
  "returns": "{count}",
  "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.