.NET

.NET

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

Undo Transactions step-by-step within a CommandMethod

195 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,

 

 

Distinguished Mentor
gasty1001
Posts: 582
Registered: ‎04-11-2010
Message 2 of 4 (182 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: 256
Registered: ‎04-15-2011
Message 3 of 4 (143 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?

 

Distinguished Mentor
gasty1001
Posts: 582
Registered: ‎04-11-2010
Message 4 of 4 (137 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.