RollBack Method


Rolls back the transaction group, which effectively undoes all transactions committed inside the group.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2011

Syntax

C#
public TransactionStatus RollBack()
Visual Basic
Public Function RollBack As TransactionStatus
Visual C++
public:
TransactionStatus RollBack()

Return Value

If finished successfully, this method returns TransactionStatus.RolledBack.

Remarks

Note that once a group is rolled back, the undone transactions cannot be redone.

RollBack can be called only when all inner transaction groups and transactions are finished, i.e. after they were either committed or rolled back.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException The Transaction group has not been started (its status is not 'Started').. -or- The transaction's document is currently in failure mode. Transaction groups cannot be closed until failure handling is finished. You may use a transaction finalizer to close a group after the failure handling ends.

See Also