Skip to content
BadBit Documentation
Sign in Download the beta

BadBit CAD operations

cad.layout.delete

Deletes layouts (LAYOUT Delete).

  • Program: BadBit CAD
  • Type of action: Changes the drawing
  • Deletes
  • Since version 2027.0.0-beta.8

Deletes layouts names with their paper space objects, like LAYOUT Delete; the drawing keeps at least one layout. If the one on screen goes, model space is shown. One undo step.

Parameters

NameTypeRequiredDescription
namesarray<string>YesThe names.

Errors

CodeJSON-RPCMeaning
invalid_params-32602The parameters do not follow the schema or a rule of the operation.
not_found-32001The object, operation, file or name does not exist.
conflict-32004The current state does not allow this now.
failed-32005The operation failed.

Example

MCP

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "arguments": {
        "names": [
          "Layout2"
        ]
      },
      "operation": "cad.layout.delete"
    },
    "name": "badbit_call_operation"
  }
}

Python

Python
import badbit

result = badbit.cad.layout.delete(names=["Layout2"])

LISP

LISP
(badbit-call "cad.layout.delete" '(("names" . ("Layout2"))))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "names": [
        "Layout2"
      ]
    },
    "operation": "cad.layout.delete"
  }
}

Full schema

JSON Schema 2020-12.

Parameters (input)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "names": {
      "description": "The names.",
      "items": {
        "type": "string"
      },
      "maxItems": 10000,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "names"
  ],
  "type": "object"
}
Result (output)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "deleted": {
      "description": "The identifiers of what was deleted.",
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "deleted"
  ],
  "type": "object"
}
Search the documentation