CAD kit command
file.export
Export
Exports the drawing as a PDF, SVG or PNG file: model space framed to its extents (a PDF fitted to its page's paper). Answers the file as base64 `data`, without saving the drawing or changing it.
- Kit
- CAD 0.1.0 (.dxf)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
format | "pdf" | "svg" | "png" | no |
Call through cad_run
text
cad_run {
"path": "<file>.dxf",
"steps": [{ "command": "file.export" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: format. cad_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
bytes | number | no | |
data | string | no | |
format | string | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"bytes": {
"type": "number"
},
"data": {
"type": "string"
},
"format": {
"type": "string"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"format": {
"enum": [
"pdf",
"svg",
"png"
],
"type": "string"
}
},
"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.