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
| Name | Type | Required | Description |
|---|---|---|---|
ids | array<string> | Yes | Object identifiers (32 hexadecimal digits each). |
Errors
| Code | JSON-RPC | Meaning |
|---|---|---|
invalid_params | -32602 | The parameters do not follow the schema or a rule of the operation. |
conflict | -32004 | The 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
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"
}