Vector kit command

artboard.setProps

Artboard Options…

Changes an artboard's name, position or size, optionally moving or scaling the art inside it.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes

Parameters

Parameters of artboard.setProps
NameTypeRequiredDescription
cornersbooleannoread by the command beside its listed parameters
heightnumberno
indexintegernoa position counted from 0 (the first is 0)
lockedAndHiddenbooleannoread by the command beside its listed parameters
moveArtbooleannodefault false; a position-only change moves the contained art with its artboard
namestringno
patternsbooleannoread by the command beside its listed parameters
scaleArtbooleannoScale Artwork with Artboard: resized, the artboard takes the art fully inside it (locked and hidden art only with lockedAndHidden?: bool, default prefs moveLockedWithArtboard) and its guides from its old rectangle onto the new one, each side by its own ratio; strokes/corners/patterns as object.scale
strokesbooleannoread by the command beside its listed parameters
widthnumberno
xnumberno
ynumberno

Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: corners, height, index, lockedAndHidden, moveArt, name, patterns, scaleArt, strokes, width, x, y. vector_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": {
    "corners": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "height": {
      "type": "number"
    },
    "index": {
      "description": "a position counted from 0 (the first is 0)",
      "type": "integer"
    },
    "lockedAndHidden": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "moveArt": {
      "description": "default false; a position-only change moves the contained art with its artboard",
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "patterns": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "scaleArt": {
      "description": "Scale Artwork with Artboard: resized, the artboard takes the art fully inside it (locked and hidden art only with lockedAndHidden?: bool, default prefs moveLockedWithArtboard) and its guides from its old rectangle onto the new one, each side by its own ratio; strokes/corners/patterns as object.scale",
      "type": "boolean"
    },
    "strokes": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "width": {
      "type": "number"
    },
    "x": {
      "type": "number"
    },
    "y": {
      "type": "number"
    }
  },
  "returns": "null, or with scaleArt {scaled: the art scaled}",
  "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.