CAD kit command
viewport.sync
Synchronize viewport
Tells the engine the editor viewport's pan offset, zoom and pixel size, so its view matches what is drawn on screen.
- Kit
- CAD 0.1.0 (.dxf)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
height | number | no | |
width | number | no | |
x | number | no | |
y | number | no | |
zoom | number | no |
Call through cad_run
text
cad_run {
"path": "<file>.dxf",
"steps": [{ "command": "viewport.sync" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: height, width, x, y, zoom. cad_run answers the step’s result in completed[i].result.
Result
Result JSON Schema
json
{
"additionalProperties": true,
"description": "an empty object",
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"height": {
"type": "number"
},
"width": {
"type": "number"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"zoom": {
"type": "number"
}
},
"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.