---
title: "stroke.set: Stroke Options — Vector kit command — Kition"
description: "Sets stroke options of the selection or ids: weight, cap, join, miter limit, alignment, dashes, arrowheads and width profile."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/stroke.set"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/stroke.set](https://developer.kition.ai/docs/kits/vector/commands/stroke.set)

# stroke.set

**Stroke Options.** Sets stroke options of the selection or ids: weight, cap, join, miter limit, alignment, dashes, arrowheads and width profile.

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: yes
- Acts on: `ids` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `align` | `"center" \| "inside" \| "outside"` | no |  |
| `alignDashes` | `boolean` | no | true: dashes fitted to corners and path ends, every run between them holding whole periods with a dash centred on each corner and end; false, the default for a new pattern: exact lengths |
| `arrowAlign` | `string` | no | like extend; tip past the end point, default; one of several alternative parameters |
| `cap` | `"butt" \| "round" \| "square"` | no |  |
| `dash` | `number[] \| null` | no |  |
| `dashOffset` | `number` | no |  |
| `endArrow` | `string \| null` | no |  |
| `id` | `integer` | no | object ID |
| `ids` | `integer[]` | no | object IDs |
| `item` | `integer \| null` | no |  |
| `join` | `"miter" \| "round" \| "bevel"` | no |  |
| `miterLimit` | `number` | no |  |
| `profile` | `string \| null` | no |  |
| `startArrow` | `string \| null` | no |  |
| `tip` | `any` | no | tip on the end point; the stroke is shortened; one of several alternative parameters |
| `weight` | `number` | no | points |

## Call through vector_run

```text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "stroke.set" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `align`, `alignDashes`, `arrowAlign`, `cap`, `dash`, `dashOffset`, `endArrow`, `id`, `ids`, `item`, `join`, `miterLimit`, `profile`, `startArrow`, `tip`, `weight`. 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": {
    "align": {
      "enum": [
        "center",
        "inside",
        "outside"
      ],
      "type": "string"
    },
    "alignDashes": {
      "description": "true: dashes fitted to corners and path ends, every run between them holding whole periods with a dash centred on each corner and end; false, the default for a new pattern: exact lengths",
      "type": "boolean"
    },
    "arrowAlign": {
      "description": "like extend; tip past the end point, default; one of several alternative parameters",
      "type": "string"
    },
    "cap": {
      "enum": [
        "butt",
        "round",
        "square"
      ],
      "type": "string"
    },
    "dash": {
      "oneOf": [
        {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "dashOffset": {
      "type": "number"
    },
    "endArrow": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "item": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "join": {
      "enum": [
        "miter",
        "round",
        "bevel"
      ],
      "type": "string"
    },
    "miterLimit": {
      "type": "number"
    },
    "profile": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "startArrow": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "tip": {
      "description": "tip on the end point; the stroke is shortened; one of several alternative parameters"
    },
    "weight": {
      "description": "points",
      "type": "number"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
