Skip to content
BadBit Documentation
Sign in Download the beta

BadBit CAD operations

cad.entity.delete

Deletes objects by identifier.

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

Deletes the objects that exist and lists the identifiers not found. One undo step brings everything back.

MCP tool
cad_delete

Parameters

NameTypeRequiredDescription
idsarray<string>YesObject identifiers (32 hexadecimal digits each).

Errors

CodeJSON-RPCMeaning
invalid_params-32602The parameters do not follow the schema or a rule of the operation.
conflict-32004The current state does not allow this now.

Example

MCP

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ids": [
        "0190f3a2b4c5d6e7f8091a2b3c4d5e6f"
      ]
    },
    "name": "cad_delete"
  }
}

Python

Python
import badbit

result = badbit.cad.entity.delete(ids=["0190f3a2b4c5d6e7f8091a2b3c4d5e6f"])

LISP

LISP
(badbit-call "cad.entity.delete" '(("ids" . ("0190f3a2b4c5d6e7f8091a2b3c4d5e6f"))))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "ids": [
        "0190f3a2b4c5d6e7f8091a2b3c4d5e6f"
      ]
    },
    "operation": "cad.entity.delete"
  }
}

Commands that do the same

ERASE

Full schema

JSON Schema 2020-12.

Parameters (input)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "ids": {
      "description": "Object identifiers (32 hexadecimal digits each).",
      "items": {
        "type": "string"
      },
      "maxItems": 200000,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "ids"
  ],
  "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"
    },
    "not_found": {
      "description": "Identifiers that do not exist.",
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "deleted",
    "not_found"
  ],
  "type": "object"
}
Search the documentation