Message 1 of 15
Disable Undo Recording
Not applicable
03-26-2018
05:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm having trouble disabling the undo recording in my PlugIn. Because it executes many transactions, the undo history contains too many entries. The user is no longer able to use the undo functionality to undo his own actions.
I searched the forums, and found a possible solution:
Database db = HostApplicationServices.WorkingDatabase; db.DisableUndoRecording(true);
But this doesn't seem to work. My code is
...
acadObj.acadDatabase.DisableUndoRecording(true);
using (DocumentLock acadDocumentLock = acadObj.acadDocument.LockDocument())
using (Transaction acadTransaction = acadObj.acadDocument.TransactionManager.StartTransaction())
{
acadTransaction.Commit();
}Even though I disabled the UndoRecording property, an entry still appears in the Undo history. No code is being executed from within the transaction, besides the Commit().
Does anyone have an idea?
I'd appreciate any help!