.NET

Reply
Active Member
6 Posts
0 Kudos
Registered: ‎09-18-2005
Post 1 of 1

How to UNDO step by step

105 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!