---
title: "view.zoomRealtime: Zoom — CAD kit command — Kition"
description: "Changes the view: to extents, all, a window, the previous view, in or out, a centre and height, a scale factor, or objects."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/view.zoomRealtime"
---

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

# view.zoomRealtime

**Zoom.** Changes the view: to extents, all, a window, the previous view, in or out, a centre and height, a scale factor, or 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 |
| --- | --- | --- | --- |
| `center` | `number[]` | no |  |
| `factor` | `number` | no |  |
| `height` | `number` | no |  |
| `limits` | `boolean` | no | scale relative to the limits |
| `mode` | `string` | no |  |
| `p1` | `number[]` | no |  |
| `p2` | `number[]` | no |  |
| `xp` | `boolean` | no | scale relative to paper space: in a viewport, `factor` paper units per model unit |

## Call through cad_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `center`, `factor`, `height`, `limits`, `mode`, `p1`, `p2`, `xp`. cad_run answers the step’s result in `completed[i].result`.

## Result



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

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "center": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "factor": {
      "type": "number"
    },
    "height": {
      "type": "number"
    },
    "limits": {
      "description": "scale relative to the limits",
      "type": "boolean"
    },
    "mode": {
      "type": "string"
    },
    "p1": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "p2": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "xp": {
      "description": "scale relative to paper space: in a viewport, `factor` paper units per model unit",
      "type": "boolean"
    }
  },
  "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).
