---
title: "select.set: Select — CAD kit command — Kition"
description: "Sets or extends the selection by handles, a window or crossing box, or a pick point, or clears it; answers the selected handles."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/select.set"
---

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

# select.set

**Select.** Sets or extends the selection by handles, a window or crossing box, or a pick point, or clears it; answers the selected handles.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `add` | `boolean` | no | in one of several forms of the parameters |
| `aperture` | `number` | no | Pick reach in drawing units; default 0.5% of the space extents. |
| `at` | `number[]` | no | in one of several forms of the parameters |
| `clear` | `boolean` | no | in one of several forms of the parameters |
| `crossing` | `boolean` | no | in one of several forms of the parameters |
| `fence` | `number[][]` | no | in one of several forms of the parameters |
| `handles` | `string[]` | no | handles; in one of several forms of the parameters |
| `pick` | `number[]` | no | Instead of handles: a drawing-space point [x,y], picked by the engine in the call's layout. With basis, holds what was at that point. |
| `window` | `number[][]` | no | in one of several forms of the parameters |

## Call through cad_run

```text
cad_run {
  "path": "<file>.dxf",
  "steps": [{ "command": "select.set" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `add`, `aperture`, `at`, `clear`, `crossing`, `fence`, `handles`, `pick`, `window`. cad_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `handles` | `string[]` | no |  |
| `selected` | `number` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "handles": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "selected": {
      "type": "number"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "add": {
      "description": "in one of several forms of the parameters",
      "type": "boolean"
    },
    "aperture": {
      "description": "Pick reach in drawing units; default 0.5% of the space extents.",
      "type": "number"
    },
    "at": {
      "description": "in one of several forms of the parameters",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "clear": {
      "default": true,
      "description": "in one of several forms of the parameters",
      "type": "boolean"
    },
    "crossing": {
      "description": "in one of several forms of the parameters",
      "type": "boolean"
    },
    "fence": {
      "description": "in one of several forms of the parameters",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "handles": {
      "description": "handles; in one of several forms of the parameters",
      "items": {
        "type": "string"
      },
      "type": "array",
      "x-khp-types": [
        "Entity"
      ]
    },
    "pick": {
      "description": "Instead of handles: a drawing-space point [x,y], picked by the engine in the call's layout. With basis, holds what was at that point.",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "window": {
      "description": "in one of several forms of the parameters",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/cad-darwin-arm64@0.1.0 and the kit itself (cad_commands through @kition/cli@0.1.1, built from KitionAI/kition-cad@1ec542d).
