---
title: "file.inspect: Inspect Drawing — CAD kit command — Kition"
description: "Answers an overview of the drawing: object counts by type, layers, blocks, styles, current settings and, optionally, a page of its objects."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/file.inspect"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/cad/commands/file.inspect](https://developer.kition.ai/docs/kits/cad/commands/file.inspect)

# 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); reference: [CAD kit commands](https://developer.kition.ai/docs/kits/cad.md)
- 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 |  |

```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/cad-darwin-arm64@0.1.0 and the kit itself (cad_commands through @kition/cli@0.1.1, built from KitionAI/kition-cad@1ec542d).
