.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Undo Transactions step-by-step within a CommandMethod

3 REPLIES 3
Reply
Message 1 of 4
SRSDS
550 Views, 3 Replies

Undo Transactions step-by-step within a CommandMethod

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,

 

 

3 REPLIES 3
Message 2 of 4
hgasty1001
in reply to: SRSDS

Hi, 

 

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

 

Gaston Nunez

Message 3 of 4
SRSDS
in reply to: hgasty1001

Dim curdoc As IAcadDocument  is not recognised.

 

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

 

Message 4 of 4
hgasty1001
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost