---
title: "view.zoomToFit: Zoom Extents — CAD kit command — Kition"
description: "Zooms the view to fit the extents of every object in the current space."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/view.zoomToFit"
---

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

# view.zoomToFit

**Zoom Extents.** Zooms the view to fit the extents of every object in the current space.

- Kit: CAD 0.1.0 (.dxf); reference: [CAD kit commands](https://developer.kition.ai/docs/kits/cad.md)
- Changes the document: no

## Parameters

None.

## Call through cad_run

```text
cad_run {
  "path": "<file>.dxf",
  "steps": [{ "command": "view.zoomToFit" }]
}
```

The required parameters, with placeholders for their types: not a tested example. cad_run answers the step’s result in `completed[i].result`.

## Result



```json
{
  "description": "nothing; the view changes",
  "type": "null"
}
```

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).
