CAD kit command

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)
Changes the document
no
Acts on
handles (a list of ids), which a run step’s on fills

Parameters

Parameters of select.set
NameTypeRequiredDescription
addbooleannoin one of several forms of the parameters
aperturenumbernoPick reach in drawing units; default 0.5% of the space extents.
atnumber[]noin one of several forms of the parameters
clearbooleannoin one of several forms of the parameters
crossingbooleannoin one of several forms of the parameters
fencenumber[][]noin one of several forms of the parameters
handlesstring[]nohandles; in one of several forms of the parameters
picknumber[]noInstead 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.
windownumber[][]noin 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

Result of select.set
NameTypeRequiredDescription
handlesstring[]no
selectednumberno
Result JSON Schema
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/[email protected] and the kit itself (cad_commands through @kition/[email protected], built from KitionAI/kition-cad@1ec542d). As data: commands.jsonl.