Suite operations
suite.input.selection
Asks the person to select objects, like ssget in LISP.
- Program: All programs
- Type of action: Reads the drawing
- Read only
- Since version 2027.0.0-beta.6
The program's "Select objects" question (window, crossing, clicks); Enter ends it. With types, only objects of those types are kept. Esc cancels the request.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
types | array<string> | No | Only objects of these types (line, polyline, circle, arc, point, text, mtext, insert, hatch, dimension…). |
Errors
| Code | JSON-RPC | Meaning |
|---|---|---|
cancelled | -32012 | Cancelled (Esc, disconnection or closing). |
busy | -32006 | BadBit is busy opening or saving a file; try again shortly. |
Example
MCP
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"arguments": {},
"operation": "suite.input.selection"
},
"name": "badbit_call_operation"
}
}Python
Python
import badbit
result = badbit.suite.input.selection()LISP
LISP
(badbit-call "suite.input.selection")JSON-RPC
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "badbit/call",
"params": {
"arguments": {},
"operation": "suite.input.selection"
}
}Full schema
JSON Schema 2020-12.
Parameters (input)
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"types": {
"default": [],
"description": "Only objects of these types (line, polyline, circle, arc, point, text, mtext, insert, hatch, dimension…).",
"items": {
"type": "string"
},
"maxItems": 64,
"type": "array"
}
},
"type": "object"
}Result (output)
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"ids": {
"description": "Object identifiers (32 hexadecimal digits each).",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"ids"
],
"type": "object"
}