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

Parameters of file.inspect
NameTypeRequiredDescription
entitiesbooleanno
limitintegerno

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

Result of file.inspect
NameTypeRequiredDescription
blocksany[]no
countsobjectno
currentLayerstringno
dimStylesstring[]no
dirtybooleanno
entitiesobject[]no
entityCountnumberno
extentsnumber[][]no
layersobject[]no
layoutsstring[]no
linetypesstring[]no
pathstringno
selectionstring[]no
spacestringno
textStylesstring[]no
titlestringno
undoany[]no
viewobjectno
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.