MLightCAD
    Preparing search index...
    • Runs a database mutation with undo support when not already inside a command transaction.

      When a command has started an undo transaction via AcEdCommand.trigger, the callback runs directly to avoid nested undo marks.

      Type Parameters

      • T

      Parameters

      • db: AcDbDatabase

        Database to mutate.

      • label: string

        Undo group label shown in the undo stack.

      • fn: () => T

        Mutation callback.

      Returns T

      The value returned by fn.