Skip to content
BadBit Documentation
Sign in Download the beta

Suite operations

suite.input.entity

Asks the person to pick one object with a click, like entsel in LISP.

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

Returns the object id and the picked point; a click on empty space returns an empty id. Esc cancels the request.

Parameters

NameTypeRequiredDescription
messagestring | nullNoThe question shown on the command line.

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": "Select a line:"
      },
      "operation": "suite.input.entity"
    },
    "name": "badbit_call_operation"
  }
}

Python

Python
import badbit

result = badbit.suite.input.entity(message="Select a line:")

LISP

LISP
(badbit-call "suite.input.entity" '(("message" . "Select a line:")))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "message": "Select a line:"
    },
    "operation": "suite.input.entity"
  }
}

Full schema

JSON Schema 2020-12.

Parameters (input)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "message": {
      "default": null,
      "description": "The question shown on the command line.",
      "maxLength": 500,
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object"
}
Result (output)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "id": {
      "description": "Object identifier (32 hexadecimal digits), or command identifier in the command list.",
      "type": [
        "string",
        "null"
      ]
    },
    "location": {
      "description": "The point [x, y, z].",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 3,
      "minItems": 3,
      "type": [
        "array",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "location"
  ],
  "type": "object"
}
Search the documentation