<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Disable Undo Recording in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892384#M26569</link>
    <description>&lt;P&gt;The OP is not using the ActiveX API, he's using the AutoCAD .NET API, and there is no way to turn off undo recording with the ActiveX API..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This forum focuses mainly on using the AutoCAD .NET API, as opposed to using the .NET framework and languages to program other API's like ActvieX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/941286"&gt;@jaboone&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;Can you see all your transactions on the screen?&lt;/P&gt;&lt;P&gt;you might try turning off numutt and cmdecho.&amp;nbsp; Also set a undomarker.&amp;nbsp; This makes acad act as one undo mark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcadDoc.StartUndoMark()&lt;BR /&gt;echo = AcadDoc.GetVariable("cmdecho")&lt;BR /&gt;mutt = AcadDoc.GetVariable("nomutt")&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Mar 2018 21:20:39 GMT</pubDate>
    <dc:creator>ActivistInvestor</dc:creator>
    <dc:date>2018-03-28T21:20:39Z</dc:date>
    <item>
      <title>Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7883890#M26559</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I searched the forums, and found a possible solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Database db = HostApplicationServices.WorkingDatabase;
db.DisableUndoRecording(true);&lt;/PRE&gt;&lt;P&gt;But this doesn't seem to work. My code is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;...
acadObj.acadDatabase.DisableUndoRecording(true);
using (DocumentLock acadDocumentLock = acadObj.acadDocument.LockDocument())
using (Transaction acadTransaction = acadObj.acadDocument.TransactionManager.StartTransaction())
{ 
    acadTransaction.Commit(); 
}&lt;/PRE&gt;&lt;P&gt;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().&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have an idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd appreciate any help!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:37:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7883890#M26559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T12:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7884063#M26560</link>
      <description>&lt;P&gt;Tried the NoUndoMarker commandFlag?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[CommandMethod("Test",CommandFlags.NoUndoMarker)]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 13:16:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7884063#M26560</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2018-03-26T13:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7884065#M26561</link>
      <description>&lt;P&gt;If you don't want the ability to undo why not use StartOpenCloseTransaction instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using (Transaction tr = db.TransactionManager.StartOpenCloseTransaction())
{


/// etc.

tr.Commit()

}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 13:17:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7884065#M26561</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2018-03-26T13:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7884877#M26562</link>
      <description>Regular transactions require undo, so they will turn it on even if you have disabled it.  the OpenCloseTransaction is essentially a wrapper for open/close of multiple objects, so it shouldn't need to enable undo (I haven't looked at the source code to confirm that though).</description>
      <pubDate>Mon, 26 Mar 2018 16:55:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7884877#M26562</guid>
      <dc:creator>artc2</dc:creator>
      <dc:date>2018-03-26T16:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7886838#M26563</link>
      <description>&lt;P&gt;Thank's for the help, but I couldn't find a solution yet. I tried it with the StartOpenCloseTransaction() method, but the result was rather confusing. The following code will not add an entry to the undo history:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; acadObj.acadDatabase.DisableUndoRecording(true);
 using (DocumentLock acadDocumentLock = acadObj.acadDocument.LockDocument())
 using (Transaction tr = acadObj.acadDatabase.TransactionManager.StartOpenCloseTransaction())
    {
         tr.Commit();
    }&lt;/PRE&gt;&lt;P&gt;However, when I create a nested transaction the exact same way (copying and pasting the code), an entry will be added to the undo history.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; acadObj.acadDatabase.DisableUndoRecording(true);
 using (DocumentLock acadDocumentLock = acadObj.acadDocument.LockDocument())
 using (Transaction tr = acadObj.acadDatabase.TransactionManager.StartOpenCloseTransaction())
 {
     acadObj.acadDatabase.DisableUndoRecording(true);
     using (DocumentLock acadDocumentLockS = acadObj.acadDocument.LockDocument())
     using (Transaction tra = acadObj.acadDatabase.TransactionManager.StartOpenCloseTransaction())
     {
         tra.Commit();
     }
     tr.Commit();
 }&lt;/PRE&gt;&lt;P&gt;Does anyone have a clue what might be going on here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 08:50:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7886838#M26563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-27T08:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7887362#M26564</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt; The following code will not add an entry to the undo history:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That's correct. StartOpenClose should not add an entry. That's what you want, isn't it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt; However, when I create a nested transaction the exact same way (copying and pasting the code), an entry will be added to the undo history.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I suspect that you might not be committing or aborting &lt;EM&gt;all&lt;/EM&gt; of your transactions. Forgetting to commit or abort a single transaction - especially when you are dealing with nested transactions can do very funny things. Perhaps carefully review your code or alternatively paste it in here - someone with a fresh pair of eyes might be able to easily spot the issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rgds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 12:23:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7887362#M26564</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2018-03-27T12:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7887389#M26565</link>
      <description>&lt;P&gt;How are you determining that entries are being added to the undo history?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymouswrote:&lt;BR /&gt;&lt;P&gt;Thank's for the help, but I couldn't find a solution yet. I tried it with the StartOpenCloseTransaction() method, but the result was rather confusing. The following code will not add an entry to the undo history:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; acadObj.acadDatabase.DisableUndoRecording(true);
 using (DocumentLock acadDocumentLock = acadObj.acadDocument.LockDocument())
 using (Transaction tr = acadObj.acadDatabase.TransactionManager.StartOpenCloseTransaction())
    {
         tr.Commit();
    }&lt;/PRE&gt;&lt;P&gt;However, when I create a nested transaction the exact same way (copying and pasting the code), an entry will be added to the undo history.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; acadObj.acadDatabase.DisableUndoRecording(true);
 using (DocumentLock acadDocumentLock = acadObj.acadDocument.LockDocument())
 using (Transaction tr = acadObj.acadDatabase.TransactionManager.StartOpenCloseTransaction())
 {
     acadObj.acadDatabase.DisableUndoRecording(true);
     using (DocumentLock acadDocumentLockS = acadObj.acadDocument.LockDocument())
     using (Transaction tra = acadObj.acadDatabase.TransactionManager.StartOpenCloseTransaction())
     {
         tra.Commit();
     }
     tr.Commit();
 }&lt;/PRE&gt;&lt;P&gt;Does anyone have a clue what might be going on here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 12:32:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7887389#M26565</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-03-27T12:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7887409#M26566</link>
      <description>&lt;P&gt;OpenCloseTransactions can't be nested. They're effectively just a&amp;nbsp;list of opened DBObjects that are closed when the OpenCloseTransaction is committed, or disposed. That means they don't work the same way regular transactions do. E.g., if you commit a nested regular transaction, but then abort the enclosing transaction, it has the same effect as aborting the nested transaction. With multiple&amp;nbsp;OpenCloseTransactions, each can be independently committed or aborted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3011731"&gt;@BKSpurgeon&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I suspect that you might not be committing or aborting &lt;EM&gt;all&lt;/EM&gt; of your transactions. Forgetting to commit or abort a single transaction - especially when you are dealing with nested transactions can do very funny things. Perhaps carefully review your code or alternatively paste it in here - someone with a fresh pair of eyes might be able to easily spot the issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 12:39:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7887409#M26566</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-03-27T12:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892094#M26567</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;thank's for your ideas. I implemented them, but sadly they didn't fix the problem. While the tip about not nesting StartOpenCloseTransactions() was helpful, I found method call causing something to appear in the Undo history. A bit of background here: My code is called when a Document&amp;nbsp;is created.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I was able to determine that the problem appears somewhere else as well, without a transaction:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;internal static void DocumentManager_DocumentCreated(object sender, DocumentCollectionEventArgs e)&lt;BR /&gt;{&lt;BR /&gt;    TypedValue[] filterlist = new TypedValue[2];
    filterlist[0] = new TypedValue((int)DxfCode.ExtendedDataRegAppName, "ASDF");&lt;BR /&gt;&amp;nbsp;   filterlist[1] = new TypedValue((int)DxfCode.ExtendedDataRegAppName, "ASDF-TWO");&lt;BR /&gt;    SelectionFilter filter = new SelectionFilter(filterlist);
    ACADObj acadObj = new ACADObj(); //Provides access to the active document and the associated Database object&lt;BR /&gt;    acadObj.acadDatabase.DisableUndoRecording(true);&lt;BR /&gt;    PromptSelectionResult psr = acadObj.acadDocument.Editor.SelectAll(filter); //This line adds something to the Undo history
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not using a transaction, and I disabled the Undo recording, but it doesn't seem to do anything. Does anyone have any other ideas? I'm getting rather desperate here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all the help so far!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 19:22:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892094#M26567</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-28T19:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892146#M26568</link>
      <description>&lt;P&gt;Can you see all your transactions on the screen?&lt;/P&gt;&lt;P&gt;you might try turning off numutt and cmdecho.&amp;nbsp; Also set a undomarker.&amp;nbsp; This makes acad act as one undo mark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcadDoc.StartUndoMark()&lt;BR /&gt;echo = AcadDoc.GetVariable("cmdecho")&lt;BR /&gt;mutt = AcadDoc.GetVariable("nomutt")&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 19:37:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892146#M26568</guid>
      <dc:creator>jaboone</dc:creator>
      <dc:date>2018-03-28T19:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892384#M26569</link>
      <description>&lt;P&gt;The OP is not using the ActiveX API, he's using the AutoCAD .NET API, and there is no way to turn off undo recording with the ActiveX API..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This forum focuses mainly on using the AutoCAD .NET API, as opposed to using the .NET framework and languages to program other API's like ActvieX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/941286"&gt;@jaboone&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;Can you see all your transactions on the screen?&lt;/P&gt;&lt;P&gt;you might try turning off numutt and cmdecho.&amp;nbsp; Also set a undomarker.&amp;nbsp; This makes acad act as one undo mark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcadDoc.StartUndoMark()&lt;BR /&gt;echo = AcadDoc.GetVariable("cmdecho")&lt;BR /&gt;mutt = AcadDoc.GetVariable("nomutt")&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 21:20:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892384#M26569</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-03-28T21:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892391#M26570</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymouswrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not using a transaction, and I disabled the Undo recording, but it doesn't seem to do anything. Does anyone have any other ideas? I'm getting rather desperate here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You still didn't answer the question I asked above:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How are you determining that entries are being added to the undo history?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Next, the UNDO history includes more than just changes made to objects in a Database. It includes changes made to system variables (that are not stored in a database, including things like CMDECHO), and changes to the state of the Drawing editor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The API you are calling only disables undo recording&amp;nbsp;of changes to&amp;nbsp;the database it's called on, and nothing else.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And with that I would also ask, what is the purpose of avoiding the adding of entries to the undo history, in the first place?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 21:24:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892391#M26570</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-03-28T21:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892457#M26571</link>
      <description>&lt;P&gt;If disabling undo recording at the application-level is what you seek, this should do it, with the caveat that a user can't undo back beyond the point where it is done:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;  Document doc = Application.DocumentManager.MdiActiveDocument;&lt;BR /&gt;  Editor ed = doc.Editor;&lt;BR /&gt;&lt;BR /&gt;  ed.Command("._UNDO", "_Control", "_None");&lt;BR /&gt;&lt;BR /&gt;  // do stuff here with undo completely disabled&lt;BR /&gt;&lt;BR /&gt;  ed.Command("._UNDO", "_All");&lt;BR /&gt;&lt;BR /&gt;  // The user will &lt;STRONG&gt;not&lt;/STRONG&gt; be able to undo beyond this point.


&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 22:06:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7892457#M26571</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-03-28T22:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7893051#M26572</link>
      <description>&lt;P&gt;Sorry. I'm determining that entries are added by checking it in AutoCAD itself. As soon as I open a new drawing (and thus calling the method above), an entry appears in the Undo list. While it isn't a problem with only one entry, we disabled most of the functionality of our plugin. Normally, dozens of entries would be added to the Undo history, meaning that the user would no longer be able to undo his own actions (because there was too much of our stuff going on in the background).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, I want to disable Undo recording for everything happening in our plugin.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I took a screenshot immediately after opening a new drawing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UndoCut.png" style="width: 351px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/481904iDFF1B04C3EEB31AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="UndoCut.png" alt="UndoCut.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the German version of AutoCAD, but I guess "Befehlsgruppe" translates roughly to "Group of Commands". When I googled the issue again, I found this:&amp;nbsp;&lt;A href="https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/UNDO-lists-an-excessive-number-of-Group-of-commands.html" target="_blank"&gt;https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/UNDO-lists-an-excessive-number-of-Group-of-commands.html&lt;/A&gt; bug report. We were using ObjectARX 2014 for development, but when I switched it to 2015, it didn't change anything. So I'm not sure if my problem is the one from the report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the help so far.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 06:43:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7893051#M26572</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-29T06:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Undo Recording</title>
      <link>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7894761#M26573</link>
      <description>&lt;P&gt;Unfortunately, without knowing more about what your app is doing, its difficult to say how to solve this, but normally, if you encapsulate all of the operations done by your app into a single transaction (not an OpenCloseTransaction, but a regular transaction started with StartTransaction), that should encapsulate all of the operations into a single undo group, not many of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My guess is that your app is starting and ending many top-level transactions, each of which will result in a distinct undo group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your app is doing things when a DWG file is opened, using the UNDO subcommands shown above after your app finishes its work will clear out all previous undo groups and cause AutoCAD to act as if nothing was done, but that's only usable if&amp;nbsp;your app is acting when a drawing is opened.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymouswrote:&lt;BR /&gt;&lt;P&gt;Sorry. I'm determining that entries are added by checking it in AutoCAD itself. As soon as I open a new drawing (and thus calling the method above), an entry appears in the Undo list. While it isn't a problem with only one entry, we disabled most of the functionality of our plugin. Normally, dozens of entries would be added to the Undo history, meaning that the user would no longer be able to undo his own actions (because there was too much of our stuff going on in the background).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, I want to disable Undo recording for everything happening in our plugin.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I took a screenshot immediately after opening a new drawing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the German version of AutoCAD, but I guess "Befehlsgruppe" translates roughly to "Group of Commands". When I googled the issue again, I found this:&amp;nbsp;&lt;A href="https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/UNDO-lists-an-excessive-number-of-Group-of-commands.html" target="_blank"&gt;https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/UNDO-lists-an-excessive-number-of-Group-of-commands.html&lt;/A&gt; bug report. We were using ObjectARX 2014 for development, but when I switched it to 2015, it didn't change anything. So I'm not sure if my problem is the one from the report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the help so far.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 16:35:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/disable-undo-recording/m-p/7894761#M26573</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-03-29T16:35:35Z</dc:date>
    </item>
  </channel>
</rss>

