Skip to content
BadBit Documentation
Sign in Download the beta

BadBit CAD operations

cad.inquiry.id

Gives the coordinates of a point (ID).

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

Returns the coordinates of point in the WCS (wcs) and in the current UCS (ucs), as ID shows them, with the drawing unit (unit). Read only. On a layout's paper, in mm (unit "mm", the area in mm²): the points by the space on screen, the objects by their own space.

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.
failed-32005The operation failed.

Example

MCP

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "arguments": {
        "point": [
          12,
          8
        ]
      },
      "operation": "cad.inquiry.id"
    },
    "name": "badbit_call_operation"
  }
}

Python

Python
import badbit

result = badbit.cad.inquiry.id(point=[12, 8])

LISP

LISP
(badbit-call "cad.inquiry.id" '(("point" . (12 8))))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "point": [
        12,
        8
      ]
    },
    "operation": "cad.inquiry.id"
  }
}

Commands that do the same

ID

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": {
    "ucs": {
      "description": "The [x, y, z] coordinates in the current UCS.",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 3,
      "minItems": 3,
      "type": "array"
    },
    "unit": {
      "description": "The unit of the numbers (the drawing unit symbol; area in square units, angles in degrees).",
      "type": "string"
    },
    "wcs": {
      "description": "The [x, y, z] coordinates in the WCS.",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 3,
      "minItems": 3,
      "type": "array"
    }
  },
  "required": [
    "wcs",
    "ucs",
    "unit"
  ],
  "type": "object"
}
Search the documentation