Skip to content
BadBit Documentation
Sign in Download the beta

BadBit CAD operations

cad.draw.base

Changes the insertion base point of the drawing (BASE).

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

Sets the insertion base point of the drawing (INSBASE) to point, like BASE: the point that INSERT of this file as a block and WBLOCK of the whole drawing use. Returns the base point.

Parameters

NameTypeRequiredDescription
pointarray<number>YesPoint [x, y]. In the answers of suite.command.run it works like a click: the running object snap (OSMODE) applies at the exact point and an associative dimension links to the object; with no snap there, like typed coordinates.

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": {
        "point": [
          100,
          50
        ]
      },
      "operation": "cad.draw.base"
    },
    "name": "badbit_call_operation"
  }
}

Python

Python
import badbit

result = badbit.cad.draw.base(point=[100, 50])

LISP

LISP
(badbit-call "cad.draw.base" '(("point" . (100 50))))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "point": [
        100,
        50
      ]
    },
    "operation": "cad.draw.base"
  }
}

Commands that do the same

BASE

Full schema

JSON Schema 2020-12.

Parameters (input)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "point": {
      "description": "Point [x, y]. In the answers of suite.command.run it works like a click: the running object snap (OSMODE) applies at the exact point and an associative dimension links to the object; with no snap there, like typed coordinates.",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 2,
      "minItems": 2,
      "type": "array"
    }
  },
  "required": [
    "point"
  ],
  "type": "object"
}
Result (output)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "base": {
      "description": "The base point [x, y] (in prompts to the person, the rubber-band line runs from it to the cursor).",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 2,
      "minItems": 2,
      "type": "array"
    }
  },
  "required": [
    "base"
  ],
  "type": "object"
}
Search the documentation