
Not applicable
09-24-2019
02:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all. Maybe someone across this problem.
I do rollback transactionGroup after commiting some transactions in this group. But it isn't works in local file which was done from central model. It successfully works in usual local file. Can anyone help me?
using (TransactionGroup transactionGroup = new TransactionGroup(Doc, "TransGroup")) { transactionGroup.Start("Numerating Sheets"); Transaction transaction = new Transaction(Doc, "Transaction"); foreach (var sheet in sheets) { if (_flag) { transactionGroup.RollBack(); break; } transaction.Start("Numbering Sheet"); ViewSheet viewSheet = Doc.GetElement(sheet.ElementId) as ViewSheet; viewSheet.SheetNumber = sheet.Number; MainWindow.ProgressBar.Dispatcher.Invoke(new ProgressBarDelegate(UpdateProgress), DispatcherPriority.Background); transaction.Commit(); } if (!_flag) transactionGroup.Assimilate();
Solved! Go to Solution.