Skip to content
BadBit Documentation
Sign in Download the beta

BadBit CAD operations

cad.quick_properties.set

Chooses the Quick Properties rows of an object type (CUI).

  • Program: BadBit CAD
  • Type of action: Acts outside the drawing
  • Changes the drawing
  • Since version 2027.0.0-beta.8

Replaces the rows Quick Properties shows for the type type with shown_rows (from the possible_rows of cad.quick_properties.list, in palette order), or goes back to the AutoCAD ones with reset, like OK in the Quick Properties part of CUI. Takes effect at once and goes to the profile; it is not undone and does not go in a batch. Returns the rows of the type.

Parameters

NameTypeRequiredDescription
resetbooleanNoGoes back to the default list before the rest.
shown_rowsarray<string> | nullNoThe rows shown, in order (the identifiers).
typestringYesObject type: line, polyline, circle, arc, point or text to create; in results also mtext, ellipse, spline, insert, hatch, dimension and others.

Errors

CodeJSON-RPCMeaning
invalid_params-32602The parameters do not follow the schema or a rule of the operation.
not_found-32001The object, operation, file or name does not exist.
permission_denied-32002The request is not accepted (the detail says why).
conflict-32004The current state does not allow this now.

Example

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"
  }
}

Commands that do the same

CUI

Full schema

JSON Schema 2020-12.

Parameters (input)
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"
}
Result (output)
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"
}
Search the documentation