Interface AcDbEntityRuntimeProperty<T>

Represents a fully-resolved, runtime property used by the property inspector.

While AcDbEntityProperty describes static metadata such as label, type, and enum options, a runtime property additionally provides an AcDbPropertyAccessor which allows the UI to read and modify the live value stored inside the AcDbEntity instance.

This separation ensures a clean design:

  • Metadata remains serializable and independent of entity logic.
  • Accessors encapsulate how values are retrieved and updated.
  • The UI can display, edit, and validate values uniformly for all entities.

A runtime property is typically produced by an entity's properties() method.

// Returned by AcDbCircle.properties():
{
name: "centerX",
label: "Center X",
type: "float",
editable: true,
accessor: {
get: () => this.center.x,
set: (v) => { this.center.x = v }
}
}
interface AcDbEntityRuntimeProperty<T = unknown> {
    accessor: AcDbPropertyAccessor<T>;
    editable?: boolean;
    name: string;
    options?: { label: string; value: unknown }[];
    type: AcDbEntityPropertyType;
}

Type Parameters

  • T = unknown

    The type of the underlying property value.

Hierarchy (View Summary)

Properties

Accessor providing read/write access to the underlying entity data.

The property inspector must use this accessor to retrieve and update values. It should not read value directly for editable properties.

editable?: boolean

Indicates whether this property can be edited by the user.

  • true → UI will present an editor widget.
  • false → UI renders the value read-only.

If omitted, the property defaults to editable.

name: string

Unique identifier for the property.

This is used internally to:

  • map UI fields to entity fields,
  • identify properties when diffing or merging,
  • implement undo/redo tracking.
options?: { label: string; value: unknown }[]

Optional enumeration choices, only used when type === "enum".

Each option includes a user-facing label and an associated raw value.

Declares the type of the property.

Determines which UI editor is used to display or edit the value. For example:

  • "color" → color picker
  • "enum" → dropdown list
  • "float" → number input