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

How to UNDO step by step

0 REPLIES 0
Reply
Message 1 of 1
emilg
224 Views, 0 Replies

How to UNDO step by step

Please,
I need help in the following problem.
My application based on window dialog:
Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(…);

Application creates some entities in following way:
trans= db.TransactionManager.StartTransaction();
ObjId = btr.AppendEntity(pEntity);
trans.AddNewlyCreatedDBObject(pEntity, true);
trans.Commit();

Now I need to UNDO step by step all created entities. But when I enter command UNDO – all entities disappeared like group or mark UNDO after first U.

I tried in my application for every transaction:
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("_UNDO _BE ",true, false,true);
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("_UNDO _EN ",true, false,true);

I also tried experiments with db.DisableUndoRecording

But nothing helps.

Please, help me to find solving and way how to solve my problem.
Thank you
0 REPLIES 0

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