CAD kit command
file.inspect
Inspect Drawing
Answers an overview of the drawing: object counts by type, layers, blocks, styles, current settings and, optionally, a page of its objects.
- Kit
- CAD 0.1.0 (.dxf)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
entities | boolean | no | |
limit | integer | no |
Call through cad_run
text
cad_run {
"path": "<file>.dxf",
"steps": [{ "command": "file.inspect" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: entities, limit. cad_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
blocks | any[] | no | |
counts | object | no | |
currentLayer | string | no | |
dimStyles | string[] | no | |
dirty | boolean | no | |
entities | object[] | no | |
entityCount | number | no | |
extents | number[][] | no | |
layers | object[] | no | |
layouts | string[] | no | |
linetypes | string[] | no | |
path | string | no | |
selection | string[] | no | |
space | string | no | |
textStyles | string[] | no | |
title | string | no | |
undo | any[] | no | |
view | object | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"blocks": {
"type": "array"
},
"counts": {
"additionalProperties": true,
"properties": {
"Line": {
"type": "number"
},
"Text": {
"type": "number"
}
},
"type": "object"
},
"currentLayer": {
"type": "string"
},
"dimStyles": {
"items": {
"type": "string"
},
"type": "array"
},
"dirty": {
"type": "boolean"
},
"entities": {
"items": {
"additionalProperties": true,
"properties": {
"color": {
"type": "string"
},
"geometry": {
"additionalProperties": true,
"type": "object"
},
"handle": {
"type": "string"
},
"layer": {
"type": "string"
},
"transparency": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"entityCount": {
"type": "number"
},
"extents": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"layers": {
"items": {
"additionalProperties": true,
"properties": {
"color": {
"type": "string"
},
"frozen": {
"type": "boolean"
},
"linetype": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"name": {
"type": "string"
},
"on": {
"type": "boolean"
}
},
"type": "object"
},
"type": "array"
},
"layouts": {
"items": {
"type": "string"
},
"type": "array"
},
"linetypes": {
"items": {
"type": "string"
},
"type": "array"
},
"path": {
"type": "string"
},
"selection": {
"items": {
"type": "string"
},
"type": "array"
},
"space": {
"type": "string"
},
"textStyles": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
},
"undo": {
"type": "array"
},
"view": {
"additionalProperties": true,
"properties": {
"center": {
"items": {
"type": "number"
},
"type": "array"
},
"height": {
"type": "number"
}
},
"type": "object"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"entities": {
"type": "boolean"
},
"limit": {
"type": "integer"
}
},
"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.