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’sonfills
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 |
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.