CAD kit command
layer.set
Set Layer Properties
Changes a layer's properties: on, frozen, locked, plot, colour, linetype, lineweight, transparency, description, plot style, or name.
- Kit
- CAD 0.1.0 (.dxf)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
color | string | no | |
description | string | no | |
frozen | boolean | no | |
linetype | string | no | |
lineweight | number | string | no | |
locked | boolean | no | |
name | string | no | |
newName | string | no | |
newVpFreeze | boolean | no | |
on | boolean | no | |
plot | boolean | no | |
plotStyle | string | no | |
transparency | number | string | no |
Call through cad_run
text
cad_run {
"path": "<file>.dxf",
"steps": [{ "command": "layer.set" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: color, description, frozen, linetype, lineweight, locked, name, newName, newVpFreeze, on, plot, plotStyle, transparency. cad_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"color": {
"type": "string"
},
"description": {
"type": "string"
},
"frozen": {
"type": "boolean"
},
"linetype": {
"type": "string",
"x-khp-name": "name",
"x-khp-types": [
"Linetype"
]
},
"lineweight": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"locked": {
"type": "boolean"
},
"name": {
"type": "string",
"x-khp-name": "name",
"x-khp-types": [
"Layer"
]
},
"newName": {
"type": "string"
},
"newVpFreeze": {
"type": "boolean"
},
"on": {
"type": "boolean"
},
"plot": {
"type": "boolean"
},
"plotStyle": {
"type": "string"
},
"transparency": {
"oneOf": [
{
"type": "number"
},
{
"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.