http://www.charlesandhudson.com/archives/hand-tools-list-important.jpgPPT_LOGO_4b
‹#›
Autodesk Developer Network, April 2010
The Rice – New Transaction Interfaces
§Transaction – no nesting
§Subtransaction – can be nested
§TransactionGroup – treat several transactions as one
§Transaction Control:
§Start
§Commit
§RollBack
§GetStatus
§Uninitialized
§Started
§Committed
§RolledBack
§Pending
C:\Documents and Settings\walmslk\Local Settings\Temporary Internet Files\Content.IE5\EARWAUQM\MPj04096740000[1].jpg
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.