Transactions have
been redone to make it more logical and provide more comprehensive set of
options for managing changes being made to the Revit document. The previous
mechanism was mainly structured with API built on top of internal mechanism.
In this release, some work was done internally to the transactions and that
is making directly through to the API. This has also helped provide more
functionality directly to the transactions through the API. So you will have
to work on transactions explicitly if you have to work with them considering
these changes. Besides opening and closing transactions, now we can logically
group certain tasks. We now have sub transactions that we can optionally
generate to do some changes. Sub-transactions help in logically splitting
larger tasks into smaller ones. They have to created within open transaction
and must be closed before closing of the outer (main) transaction. They don’t
have any name and thus do not appear in the Undo stack. Grouping will help
group transactions in the undo stack so that they can be undone in one shot.
So we can start, commit, rollback and get status which includes the flag of
Pending which indicates that some error has happened and with some
interaction from the user, it will be either rolled back or committed once
the user resolves the issue. |
|
So overall this
helps manage the undo stack more closely. And so users now have greater
control on deciding on how to group tasks in one undo stack or have them
undone in more granular fashion. |