Transactions not reliably showing up in Revit Undo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The transactions performed by my application are not reliably showing up in the Revit Undo list and when they do they may not all show up. This has been driving me crazy for a while. I've read everything I could find to no end and I've tried every combination of using transaction and using transaction group. The application in question functions just fine. It it just that the operations it makes do not show up in the Revit Undo.
I am thinking I am not understanding something simple. I am expecting every transaction start/commit to show up in the Undo with its text description as designated and I am expecting the Undo list to remain until the Revit file is saved, whereupon I assume the Undo items would disappear. This application can search-for-replace-with rename views. Instead I am seeing Undo items sometimes show up. For example a whole set of search-for-replace-with operations might show up in the Undo, but usually not and I have not been able to pin down the condition where the Undos do show up. I suspect when it does work, ie show up in the Undo, then all subsequent intended app operation Undos might also show up. Any Undos that do show up will undo as expected. Undos not undone remain in the Undo list after the file has been saved. I am surprised at that. Revit obviously cannot do anything with those ort undo list items. I forget what error message it reports. Perhaps something like, "... cannot index .. ". If I run the app subsequent times when there were items already in the Undo list and if the app's operations did manage to make it to the undo list, then the previous Undo list items are gone.
The application is performing the operations from within a Windows Form. I'm not going to post the code because it looks just like every other transaction using and group using code I've seen and I have tried every combination and style of start and commit location within the code. The application currently has the start and commit bracketing each view rename. The overall question is how can transactions not show up in the Undo list. I am assuming they all should. (Revit 2016) Any help would be much appreciated. Thank you.