Operaciones de BadBit CAD
cad.format.scale_list_get
Lee la lista de escalas del dibujo (SCALELISTEDIT).
- Programa: BadBit CAD
- Tipo de acción: Lee el dibujo
- Solo lectura
- Desde la versión 2027.0.0-beta.8
Devuelve las escalas de la lista del dibujo, en orden, con el nombre y las unidades del papel y del dibujo. No cambia nada.
Parámetros
Sin parámetros.
Errores
| Código | JSON-RPC | Qué significa |
|---|---|---|
invalid_params | -32602 | Los parámetros no siguen el esquema o una regla de la operación. |
not_found | -32001 | El objeto, la operación, el archivo o el nombre no existe. |
Ejemplo
MCP
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"arguments": {},
"operation": "cad.format.scale_list_get"
},
"name": "badbit_call_operation"
}
}Python
Python
import badbit
result = badbit.cad.format.scale_list_get()LISP
LISP
(badbit-call "cad.format.scale_list_get")JSON-RPC
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "badbit/call",
"params": {
"arguments": {},
"operation": "cad.format.scale_list_get"
}
}Esquema completo
JSON Schema 2020-12, con las descripciones en inglés.
Parámetros (entrada)
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"type": "object"
}Resultado (salida)
JSON
{
"$defs": {
"ScaleItem": {
"additionalProperties": false,
"properties": {
"drawing": {
"description": "The drawing units.",
"format": "double",
"type": "number"
},
"name": {
"description": "Name (of the layer, of the system variable or of the command, depending on the operation).",
"maxLength": 255,
"minLength": 1,
"type": "string"
},
"paper": {
"description": "The paper: its name or the paper units, depending on the operation.",
"format": "double",
"type": "number"
}
},
"required": [
"name",
"paper",
"drawing"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"scales": {
"description": "The scales, each with name, paper and drawing.",
"items": {
"$ref": "#/$defs/ScaleItem"
},
"type": "array"
}
},
"required": [
"scales"
],
"type": "object"
}