I typically use Revit.DB.Transaction() object
from Autodesk.Revit.DB import Transaction t = Transaction(doc, 'Name') t.Start() #Do stuff t.Commit()
But most code samples I see, and the Dynamo wiki page suggests the
from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument TransactionManager.Instance.EnsureInTransaction(doc) #Do stuff TransactionManager.Instance.TransactionTaskDone()
Are there any disadvantages to using
advantages in using
The wiki page mentions “There is no way to rollback the main Dynamo Transaction”, so that seems to be +1 for typical transactions. Any other differences?