Skip to content
BadBit Documentation
Sign in Download the beta

Suite operations

suite.input.point

Asks the person for a point on the command line, like getpoint in LISP.

  • Program: All programs
  • Type of action: Reads the drawing
  • Read only
  • Since version 2027.0.0-beta.6

Shows the message question and waits for a click on the drawing (with object snaps) or typed coordinates. With base, a rubber-band line is drawn from it. With keywords (separated by spaces, as in initget), the answer can be one of them. With optional, Enter is accepted and the result comes back empty. Esc cancels the request.

Parameters

NameTypeRequiredDescription
basearray<number> | nullNoThe base point [x, y] (in prompts to the person, the rubber-band line runs from it to the cursor).
keywordsstring | nullNoThe accepted keywords, separated by spaces, as in initget ("Undo Close").
messagestring | nullNoThe question shown on the command line.
optionalbooleanNoAccept Enter without an answer (the result comes back empty).

Errors

CodeJSON-RPCMeaning
cancelled-32012Cancelled (Esc, disconnection or closing).
busy-32006BadBit is busy opening or saving a file; try again shortly.

Example

MCP

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "arguments": {
        "message": "Pick the insertion point:"
      },
      "operation": "suite.input.point"
    },
    "name": "badbit_call_operation"
  }
}

Python

Python
import badbit

result = badbit.suite.input.point(message="Pick the insertion point:")

LISP

LISP
(badbit-call "suite.input.point" '(("message" . "Pick the insertion point:")))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "message": "Pick the insertion point:"
    },
    "operation": "suite.input.point"
  }
}

Full schema

JSON Schema 2020-12.

Parameters (input)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "base": {
      "default": null,
      "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",
        "null"
      ]
    },
    "keywords": {
      "default": null,
      "description": "The accepted keywords, separated by spaces, as in initget (\"Undo Close\").",
      "maxLength": 500,
      "type": [
        "string",
        "null"
      ]
    },
    "message": {
      "default": null,
      "description": "The question shown on the command line.",
      "maxLength": 500,
      "type": [
        "string",
        "null"
      ]
    },
    "optional": {
      "default": false,
      "description": "Accept Enter without an answer (the result comes back empty).",
      "type": "boolean"
    }
  },
  "type": "object"
}
Result (output)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "keyword": {
      "description": "The chosen keyword.",
      "type": [
        "string",
        "null"
      ]
    },
    "location": {
      "description": "The point [x, y, z].",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 3,
      "minItems": 3,
      "type": [
        "array",
        "null"
      ]
    }
  },
  "required": [
    "location",
    "keyword"
  ],
  "type": "object"
}
Search the documentation