CAD kit command

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)
Changes the document
no

Parameters

Parameters of viewport.modelSpace
NameTypeRequiredDescription
atnumber[]no
handlestringno

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

Result of viewport.modelSpace
NameTypeRequiredDescription
viewportstringno
Result JSON Schema
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/[email protected] and the kit itself (cad_commands through @kition/[email protected], built from KitionAI/kition-cad@1ec542d). As data: commands.jsonl.