![]() ![]() ![]() When you start a new transaction using AcTransactionManager::startTransaction(), the new transaction is added to the top of the stack and a pointer to it is returned (an instance of AcTransaction). The transaction manager maintains transactions in a stack, with the most recent transaction at the top of the stack. Transactions can be nested-that is, you can start one transaction inside another and end or abort the recent transaction. Here's what the ObjectARX Developer's Guide says about "Nesting Transactions": In this post we're going to look at some code which uses some nested transactions and allows the user to choose whether to commit or abort each one. That said, the transaction mechanism inside AutoCAD has some pretty cool nesting capabilities that make it very flexible and a great way to manage sets of database operation and to roll them back should they no longer be necessary. The simple answer is that you mostly only need one transaction active per command: you shouldn't leave a transaction active outside of a command, as this is likely to cause problems at some point, and within your own command one transaction is typically enough to do what you want. Is it ever required to use more than one transaction per program? I received this question by email last week: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |