.NET

Reply
Distinguished Contributor
SRSDS
Posts: 243
Registered: ‎04-15-2011
Message 1 of 4 (172 Views)

Undo Transactions step-by-step within a CommandMethod

172 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: 449
Registered: ‎04-11-2010
Message 2 of 4 (159 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

Distinguished Contributor
SRSDS
Posts: 243
Registered: ‎04-15-2011
Message 3 of 4 (120 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: 449
Registered: ‎04-11-2010
Message 4 of 4 (114 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community