---
title: "layer.set: Set Layer Properties — CAD kit command — Kition"
description: "Changes a layer's properties: on, frozen, locked, plot, colour, linetype, lineweight, transparency, description, plot style, or name."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/layer.set"
---

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

# 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); reference: [CAD kit commands](https://developer.kition.ai/docs/kits/cad.md)
- 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/cad-darwin-arm64@0.1.0 and the kit itself (cad_commands through @kition/cli@0.1.1, built from KitionAI/kition-cad@1ec542d).
