.NET

Reply
Active Member
emilg
Posts: 6
Registered: ‎09-18-2005
Message 1 of 1 (103 Views)

How to UNDO step by step

103 Views, 0 Replies
10-05-2005 09:55 PM
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
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 or visit the Installation and Licensing Forum to get help installing your software.