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

Operaciones de BadBit CAD

cad.quick_properties.set

Elige las filas de las Propiedades rápidas de un tipo de objeto (CUI).

  • Programa: BadBit CAD
  • Tipo de acción: Actúa fuera del dibujo
  • Modifica el dibujo
  • Desde la versión 2027.0.0-beta.8

Cambia las filas que muestran las Propiedades rápidas para el tipo type por las shown_rows (de las possible_rows de cad.quick_properties.list, en el orden de la paleta), o vuelve a las de AutoCAD con reset, como el Aceptar de la parte Propiedades rápidas del CUI. Vale enseguida y va al perfil; no entra en el deshacer ni en el lote. Devuelve las filas del tipo.

Parámetros

NombreTipoObligatorioDescripción
resetbooleanNoVuelve a la lista por defecto antes del resto.
shown_rowsarray<string> | nullNoLas filas mostradas, en orden (los identificadores).
typestringSíTipo de objeto: line, polyline, circle, arc, point o text para crear; en los resultados también mtext, ellipse, spline, insert, hatch, dimension y otros.

Errores

CódigoJSON-RPCQué significa
invalid_params-32602Los parámetros no siguen el esquema o una regla de la operación.
not_found-32001El objeto, la operación, el archivo o el nombre no existe.
permission_denied-32002La petición no se acepta (el detalle dice por qué).
conflict-32004El estado actual no lo permite ahora.

Ejemplo

MCP

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "arguments": {
        "shown_rows": [
          "props-layer",
          "props-radius",
          "props-area"
        ],
        "type": "circle"
      },
      "operation": "cad.quick_properties.set"
    },
    "name": "badbit_call_operation"
  }
}

Python

Python
import badbit

result = badbit.cad.quick_properties.set(shown_rows=["props-layer", "props-radius", "props-area"], type="circle")

LISP

LISP
(badbit-call "cad.quick_properties.set" '(("shown_rows" . ("props-layer" "props-radius" "props-area")) ("type" . "circle")))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "shown_rows": [
        "props-layer",
        "props-radius",
        "props-area"
      ],
      "type": "circle"
    },
    "operation": "cad.quick_properties.set"
  }
}

Comandos que hacen lo mismo

CUI

Esquema completo

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

Parámetros (entrada)
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "reset": {
      "default": false,
      "description": "Goes back to the default list before the rest.",
      "type": "boolean"
    },
    "shown_rows": {
      "default": null,
      "description": "The rows shown, in order (the identifiers).",
      "items": {
        "type": "string"
      },
      "maxItems": 200,
      "type": [
        "array",
        "null"
      ]
    },
    "type": {
      "description": "Object type: line, polyline, circle, arc, point or text to create; in results also mtext, ellipse, spline, insert, hatch, dimension and others.",
      "maxLength": 64,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "type": "object"
}
Resultado (salida)
JSON
{
  "$defs": {
    "QuickPropertiesRow": {
      "properties": {
        "label": {
          "description": "The name, in English.",
          "type": "string"
        },
        "row_id": {
          "description": "The identifier of the Quick Properties row.",
          "type": "string"
        }
      },
      "required": [
        "row_id",
        "label"
      ],
      "type": "object"
    },
    "QuickPropertiesType": {
      "properties": {
        "customized": {
          "description": "The type has the person's choice (otherwise, the AutoCAD default rows).",
          "type": "boolean"
        },
        "possible_rows": {
          "description": "The rows that can be chosen for the type.",
          "items": {
            "$ref": "#/$defs/QuickPropertiesRow"
          },
          "type": "array"
        },
        "shown_rows": {
          "description": "The rows shown, in order (the identifiers).",
          "items": {
            "$ref": "#/$defs/QuickPropertiesRow"
          },
          "type": "array"
        },
        "type": {
          "description": "Object type: line, polyline, circle, arc, point or text to create; in results also mtext, ellipse, spline, insert, hatch, dimension and others.",
          "type": "string"
        }
      },
      "required": [
        "type",
        "shown_rows",
        "possible_rows",
        "customized"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "types": {
      "description": "Only objects of these types (line, polyline, circle, arc, point, text, mtext, insert, hatch, dimension…).",
      "items": {
        "$ref": "#/$defs/QuickPropertiesType"
      },
      "type": "array"
    }
  },
  "required": [
    "types"
  ],
  "type": "object"
}
Buscar en la documentación