Skip to content
BadBit Documentation
Sign in Download the beta

BadBit CAD operations

cad.format.scale_list_get

Reads the scale list of the drawing (SCALELISTEDIT).

  • Program: BadBit CAD
  • Type of action: Reads the drawing
  • Read only
  • Since version 2027.0.0-beta.8

Returns the scales of the drawing list, in order, with the name and the paper and drawing units. Changes nothing.

Parameters

No parameters.

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.

Example

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"
  }
}

Full schema

JSON Schema 2020-12.

Parameters (input)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "type": "object"
}
Result (output)
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"
}
Search the documentation