.NET

.NET

Reply
Mentor
SRSDS
Posts: 247
Registered: ‎04-15-2011
Message 1 of 4 (188 Views)

Undo Transactions step-by-step within a CommandMethod

188 Views, 3 Replies
09-26-2013 04:12 PM

Hi,

 

I have a CommandMethod which has a loop that opens and commits transactions until the user is finished with it and exits. 

 

I would like each transaction to be undone seperately but the undo command undoes the CommandMethod (along with all the transactions that occured while in the loop)

 

Do I need to use the COM StartUndoMark and EndUndoMark to get this working?

 

Hope someone can help,

 

 

Valued Mentor
gasty1001
Posts: 471
Registered: ‎04-11-2010
Message 2 of 4 (175 Views)

Re: Undo Transactions step-by-step within a CommandMethod

09-26-2013 06:01 PM in reply to: SRSDS

Hi, 

 

TT implemented a clever way to allow undos in this link: Undo

 

Gaston Nunez

Mentor
SRSDS
Posts: 247
Registered: ‎04-15-2011
Message 3 of 4 (136 Views)

Re: Undo Transactions step-by-step within a CommandMethod

09-27-2013 11:58 AM in reply to: gasty1001

Dim curdoc As IAcadDocument  is not recognised.

 

Appologies for my ignorance.but is this a COM component that I need to reference in?

 

Valued Mentor
gasty1001
Posts: 471
Registered: ‎04-11-2010
Message 4 of 4 (130 Views)

Re: Undo Transactions step-by-step within a CommandMethod

09-27-2013 12:54 PM in reply to: SRSDS

Hi,

 

Yes, IAcadDocument can be replaced by Autodesk.AutoCAD.Interop.AcadDocument, you need to set references to  Autodesk.AutoCAD.Interop and Autodesk.AutoCAD.Interop.Common you can find the references in the GAC or the inc folder of the SDK depending on version.

 

Gaston Nunez

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.