BadBit CAD operations
cad.format.linetype_load
Loads linetypes from the library (LINETYPE, Load).
- Program: BadBit CAD
- Type of action: Changes the drawing
- Changes the drawing
- Since version 2027.0.0-beta.8
Loads into the drawing the linetypes names from the BadBit library (those of cad.format.linetype_list, in available), like Load in the LINETYPE dialog. Returns how many came in.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
names | array<string> | Yes | The names. |
Errors
| Code | JSON-RPC | Meaning |
|---|---|---|
invalid_params | -32602 | The parameters do not follow the schema or a rule of the operation. |
not_found | -32001 | The object, operation, file or name does not exist. |
conflict | -32004 | The current state does not allow this now. |
failed | -32005 | The operation failed. |
Example
MCP
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"arguments": {
"names": [
"DASHED",
"CENTER"
]
},
"operation": "cad.format.linetype_load"
},
"name": "badbit_call_operation"
}
}Python
Python
import badbit
result = badbit.cad.format.linetype_load(names=["DASHED", "CENTER"])LISP
LISP
(badbit-call "cad.format.linetype_load" '(("names" . ("DASHED" "CENTER"))))JSON-RPC
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "badbit/call",
"params": {
"arguments": {
"names": [
"DASHED",
"CENTER"
]
},
"operation": "cad.format.linetype_load"
}
}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": {
"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"
}