AcDbDatabaseChange:
    | {
        after?: AcDbObject;
        before: AcDbObject;
        kind: "modify";
        objectId: string;
    }
    | { container: AcDbChangeContainer; kind: "append"; object: AcDbObject }
    | { container: AcDbChangeContainer; kind: "remove"; object: AcDbObject }
    | { after?: unknown; before: unknown; kind: "sysvar"; name: string }

A single recorded change within a transaction or undo record.

Each variant stores enough information for AcDbChangeApplier to replay the change forward or in reverse.

Type declaration

  • { after?: AcDbObject; before: AcDbObject; kind: "modify"; objectId: string }
    • Optionalafter?: AcDbObject

      State after commit; populated by AcDbChangeRecorder.finalize

    • before: AcDbObject

      State before the transaction or undoable operation

    • kind: "modify"

      Property snapshot change for one database-resident object

    • objectId: string

      Object whose properties changed

  • { container: AcDbChangeContainer; kind: "append"; object: AcDbObject }
    • container: AcDbChangeContainer

      Container that received the object

    • kind: "append"

      Object inserted into a container

    • object: AcDbObject

      Appended object snapshot

  • { container: AcDbChangeContainer; kind: "remove"; object: AcDbObject }
    • container: AcDbChangeContainer

      Container that owned the object

    • kind: "remove"

      Object removed from a container

    • object: AcDbObject

      Removed object snapshot

  • { after?: unknown; before: unknown; kind: "sysvar"; name: string }
    • Optionalafter?: unknown

      Value after commit; populated by AcDbChangeRecorder.finalize

    • before: unknown

      Value before the mutation

    • kind: "sysvar"

      System variable value change

    • name: string

      Normalized system variable name