CAD kit command

select.quick

Quick Select...

Selects objects by type and a property comparison (equals, differs, greater, less, wildcard), new, appended or excluded, over the drawing or the selection.

Kit
CAD 0.1.0 (.dxf)
Changes the document
no

Parameters

Parameters of select.quick
NameTypeRequiredDescription
applyTo"drawing" | "selection"no
colorstringno
layerstringnoa layer name
mode"new" | "append" | "exclude"no
operator"=" | "!=" | ">" | "<" | "*"nowildcard
propertystringno
typestringno
valuestring | number | booleanno

Call through cad_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: applyTo, color, layer, mode, operator, property, type, value. cad_run answers the step’s result in completed[i].result.

Result

Result of select.quick
NameTypeRequiredDescription
handlesstring[]no
messagestringno
selectednumberno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "handles": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "message": {
      "type": "string"
    },
    "selected": {
      "type": "number"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "applyTo": {
      "enum": [
        "drawing",
        "selection"
      ],
      "type": "string"
    },
    "color": {
      "type": "string"
    },
    "layer": {
      "description": "a layer name",
      "type": "string"
    },
    "mode": {
      "enum": [
        "new",
        "append",
        "exclude"
      ],
      "type": "string"
    },
    "operator": {
      "description": "wildcard",
      "enum": [
        "=",
        "!=",
        ">",
        "<",
        "*"
      ],
      "type": "string"
    },
    "property": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "value": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        }
      ]
    }
  },
  "returns": "selected handles",
  "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.