Provides read/write access to a property value stored inside an entity.

This interface abstracts how a property is retrieved from and written back to the underlying AcDbEntity. It allows the property panel to operate on entity data without knowing the internal structure of each entity class.

A typical implementation simply forwards get() / set() to internal fields of the entity. More advanced use cases may wrap the setter with:

  • validation,
  • undo/redo recording,
  • transaction systems,
  • type conversion,
  • event dispatch.
// Inside an entity class:
{
name: "radius",
label: "Radius",
type: "float",
editable: true,
accessor: {
get: () => this.radius,
set: (v) => { this.radius = v }
}
}
interface AcDbPropertyAccessor<T = unknown> {
    get(): T;
    set(value: T): void;
}

Type Parameters

  • T = unknown

    The type of the underlying property value.

Methods

Methods

  • Retrieves the current property value from the underlying entity.

    Called by the property panel whenever the UI needs a fresh value (e.g. on render, on selection change, or after external updates).

    Implementers should ensure this method has no side effects.

    Returns T

    The current value of the property.

  • Updates the property value on the underlying entity.

    Called by the property panel when the user edits the value in the UI. This method should update the internal state of the entity immediately.

    Implementers may:

    • perform validation,
    • trigger change notifications,
    • record undo/redo commands,
    • clamp or normalize input values.

    Parameters

    • value: T

      The new value assigned to this property.

    Returns void