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