---
title: "viewport.modelSpace: Model Space (in viewport) — CAD kit command — Kition"
description: "Makes a layout viewport active so editing happens in model space through it, by handle or by a paper point inside it."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/viewport.modelSpace"
---

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

# viewport.modelSpace

**Model Space (in viewport).** Makes a layout viewport active so editing happens in model space through it, by handle or by a paper point inside it.

- 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 |
| --- | --- | --- | --- |
| `at` | `number[]` | no |  |
| `handle` | `string` | no |  |

## Call through cad_run

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

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `viewport` | `string` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "viewport": {
      "type": "string"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "at": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "handle": {
      "type": "string",
      "x-khp-types": [
        "Entity"
      ]
    }
  },
  "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).
