BadBit CAD operations
cad.view.isolate
Isolates, hides or shows objects again (ISOLATEOBJECTS, HIDEOBJECTS, UNISOLATEOBJECTS).
- Program: BadBit CAD
- Type of action: Changes the drawing
- Changes the drawing
- Since version 2027.0.0-beta.8
mode isolate hides every other object in the current space (ISOLATEOBJECTS), hide hides objects ids (HIDEOBJECTS) and end shows all again (UNISOLATEOBJECTS). The objects do not change. Returns how many changed and how many are hidden.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ids | array<string> | null | No | Object identifiers (32 hexadecimal digits each). |
mode | IsolateMode | Yes | The mode: in zoom, extents, window, center, previous or factor; in a measurement, distance, radius, angle or area; in isolation, isolate, hide or end. |
Errors
| Code | JSON-RPC | Meaning |
|---|---|---|
invalid_params | -32602 | The parameters do not follow the schema or a rule of the operation. |
not_found | -32001 | The object, operation, file or name does not exist. |
conflict | -32004 | The current state does not allow this now. |
failed | -32005 | The operation failed. |
Example
MCP
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"arguments": {
"ids": [
"0190f3a2b4c5d6e7f8091a2b3c4d5e6f"
],
"mode": "isolate"
},
"operation": "cad.view.isolate"
},
"name": "badbit_call_operation"
}
}Python
Python
import badbit
result = badbit.cad.view.isolate(ids=["0190f3a2b4c5d6e7f8091a2b3c4d5e6f"], mode="isolate")LISP
LISP
(badbit-call "cad.view.isolate" '(("ids" . ("0190f3a2b4c5d6e7f8091a2b3c4d5e6f")) ("mode" . "isolate")))JSON-RPC
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "badbit/call",
"params": {
"arguments": {
"ids": [
"0190f3a2b4c5d6e7f8091a2b3c4d5e6f"
],
"mode": "isolate"
},
"operation": "cad.view.isolate"
}
}Commands that do the same
HIDEOBJECTSISOLATEOBJECTSUNISOLATEOBJECTS
Full schema
JSON Schema 2020-12.
Parameters (input)
JSON
{
"$defs": {
"IsolateMode": {
"oneOf": [
{
"const": "isolate",
"type": "string"
},
{
"const": "hide",
"type": "string"
},
{
"const": "end",
"type": "string"
}
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"ids": {
"default": null,
"description": "Object identifiers (32 hexadecimal digits each).",
"items": {
"type": "string"
},
"maxItems": 200000,
"minItems": 1,
"type": [
"array",
"null"
]
},
"mode": {
"$ref": "#/$defs/IsolateMode",
"description": "The mode: in zoom, extents, window, center, previous or factor; in a measurement, distance, radius, angle or area; in isolation, isolate, hide or end."
}
},
"required": [
"mode"
],
"type": "object"
}Result (output)
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"count": {
"description": "The number: of items (the original included) or of objects that changed.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"hidden": {
"description": "How many objects are hidden now.",
"format": "uint",
"minimum": 0,
"type": "integer"
}
},
"required": [
"count",
"hidden"
],
"type": "object"
}