Skip to content
BadBit Documentation
Sign in Download the beta

BadBit CAD operations

cad.format.linetype_delete

Deletes unused linetypes (LINETYPE, Delete).

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

Deletes the linetypes names from the drawing, like Delete in the LINETYPE dialog: a linetype in use (by an object, a layer or the current one) and the system ones stay. Returns how many were removed.

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": [
          "DASHED"
        ]
      },
      "operation": "cad.format.linetype_delete"
    },
    "name": "badbit_call_operation"
  }
}

Python

Python
import badbit

result = badbit.cad.format.linetype_delete(names=["DASHED"])

LISP

LISP
(badbit-call "cad.format.linetype_delete" '(("names" . ("DASHED"))))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "names": [
        "DASHED"
      ]
    },
    "operation": "cad.format.linetype_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": 1000,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "names"
  ],
  "type": "object"
}
Result (output)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "changed_count": {
      "description": "How many items changed.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "changed_count"
  ],
  "type": "object"
}
Search the documentation