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

eWasOpenForUndo problem

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
476 Views, 2 Replies

eWasOpenForUndo problem


Hi,

Does anyone
meet the 

eWasOpenForUndo

size=1>error when trying to open a database object in undo context? If i really
need open an object in undo context, what should i do to open the object
sucessfully?

 

Thanks


size=1>-Jerry
2 REPLIES 2
Message 2 of 3
amiltonf
in reply to: Anonymous

Are you using a transaction to open the object?

-------------------------------------------------

Posted by: shichongdong
Date: Jan/05/06 - 23:30 (EST)

eWasOpenForUndo problem
Hi,
Does anyone meet the eWasOpenForUndo error when trying to open a database object in undo context? If i really need open an object in undo context, what should i do to open the object sucessfully?

Thanks
-Jerry
Message 3 of 3
FRFR1426
in reply to: Anonymous

I think you can not open an object while undoing for obvious reasons. You can detect this case with DBObject.IsUndoing and delay your operation by registering an event handler for Application.Idle for example :

 

if (dbo.IsUndoing)
Application.Idle += Application_Idle; [..] void Application_Idle(object sender, EventArgs e) { try { // Do your operation } finally { Application.Idle -= Application_Idle; } }
Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr

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

Post to forums  

Autodesk Design & Make Report

”Boost