Operações da suíte
suite.input.selection
Pede que a pessoa selecione objetos, como o ssget do LISP.
- Programa: Todos os programas
- Tipo de ação: Lê o desenho
- Só leitura
- Desde a versão 2027.0.0-beta.6
A pergunta "Selecione objetos" do programa (janela, cruzamento, cliques); o Enter termina. Com types, só os objetos desses tipos entram. Esc cancela o pedido.
Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
types | array<string> | Não | Só objetos destes tipos (line, polyline, circle, arc, point, text, mtext, insert, hatch, dimension…). |
Erros
| Código | JSON-RPC | O que significa |
|---|---|---|
cancelled | -32012 | Cancelado (Esc, desconexão ou fechamento). |
busy | -32006 | O BadBit está abrindo ou salvando um arquivo; tente de novo daqui a pouco. |
Exemplo
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"
}
}Esquema completo
JSON Schema 2020-12, com as descrições em inglês.
Parâmetros (entrada)
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"
}Resultado (saída)
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"
}