Saltar al contenido
BadBit Documentación
Iniciar sesión Descargar la beta

Operaciones de la suite

suite.view.zoom

Cambia lo que muestra la vista: extensión, una ventana, un centro, la vista anterior o un factor.

  • Programa: Todos los programas
  • Tipo de acción: Lee el dibujo
  • Solo lectura
  • Desde la versión 2027.0.0-beta.6

Mueve la vista del dibujo activo y devuelve el área visible después del cambio, como [xmin, ymin, xmax, ymax] en unidades del dibujo. No cambia el dibujo.

Parámetros

NombreTipoObligatorioDescripción
centerarray<number> | nullNoPunto del centro [x, y].
factornumber | nullNoFactor del zoom (2 acerca dos veces; 0.5 aleja).
heightnumber | nullNoLa altura del texto; en el zoom, la altura visible; en las imágenes, la altura en píxeles; en la vista guardada, en unidades del dibujo; en la ventana gráfica, la altura del modelo que muestra, en unidades del dibujo.
modeZoomModeSíEl modo: en el zoom, extents, window, center, previous o factor; en la medida, distance, radius, angle o area; en el aislamiento, isolate, hide o end.
windowarray<number> | nullNoVentana [xmin, ymin, xmax, ymax] en unidades del dibujo (en el papel de una presentación, en mm).

Errores

CódigoJSON-RPCQué significa
invalid_params-32602Los parámetros no siguen el esquema o una regla de la operación.

Ejemplo

MCP

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "arguments": {
        "mode": "extents"
      },
      "operation": "suite.view.zoom"
    },
    "name": "badbit_call_operation"
  }
}

Python

Python
import badbit

result = badbit.suite.view.zoom(mode="extents")

LISP

LISP
(badbit-call "suite.view.zoom" '(("mode" . "extents")))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "mode": "extents"
    },
    "operation": "suite.view.zoom"
  }
}

Comandos que hacen lo mismo

ZEZOOM

Esquema completo

JSON Schema 2020-12, con las descripciones en inglés.

Parámetros (entrada)
JSON
{
  "$defs": {
    "ZoomMode": {
      "oneOf": [
        {
          "const": "extents",
          "type": "string"
        },
        {
          "const": "window",
          "type": "string"
        },
        {
          "const": "center",
          "type": "string"
        },
        {
          "const": "previous",
          "type": "string"
        },
        {
          "const": "factor",
          "type": "string"
        }
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "center": {
      "default": null,
      "description": "Center point [x, y].",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 2,
      "minItems": 2,
      "type": [
        "array",
        "null"
      ]
    },
    "factor": {
      "default": null,
      "description": "Zoom factor (2 zooms in twice; 0.5 zooms out).",
      "format": "double",
      "minimum": 0,
      "type": [
        "number",
        "null"
      ]
    },
    "height": {
      "default": null,
      "description": "Text height; in zoom, the visible height; in images, the height in pixels; in a named view, in drawing units; in a layout viewport, the height of the model it shows, in drawing units.",
      "format": "double",
      "minimum": 0,
      "type": [
        "number",
        "null"
      ]
    },
    "mode": {
      "$ref": "#/$defs/ZoomMode",
      "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."
    },
    "window": {
      "default": null,
      "description": "Window [xmin, ymin, xmax, ymax] in drawing units (in the paper space of a layout, in mm).",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 4,
      "minItems": 4,
      "type": [
        "array",
        "null"
      ]
    }
  },
  "required": [
    "mode"
  ],
  "type": "object"
}
Resultado (salida)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "visible": {
      "description": "The visible area after the view changes [xmin, ymin, xmax, ymax].",
      "items": {
        "format": "double",
        "type": "number"
      },
      "maxItems": 4,
      "minItems": 4,
      "type": "array"
    }
  },
  "required": [
    "visible"
  ],
  "type": "object"
}
Buscar en la documentación