what is wrong with my code

what is wrong with my code

Anonymous
Not applicable
1,076 Views
4 Replies
Message 1 of 5

what is wrong with my code

Anonymous
Not applicable
Hi,
am trying to close currently opened document using Object ARX wrappers class.
am getting following exception
-> System.Runtime.InteropServices.COMException (0x8021006F): Drawing is busy.

Here is my code.

mApp = (AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
mApp.ActiveDocument.Close(true, mApp.ActiveDocument.Name);

Is any thing wrong with my code.

Regards,
Ramesh V
0 Likes
1,077 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
i am having the same error. did you figure out how to get around the "drawing is busy" error or has anyone else in vb.net or c# and .net 2005????
0 Likes
Message 3 of 5

Anonymous
Not applicable

I had to bump this long dead post, because I'm having the same problem and all I was able to find was same questions without answers

 

the only difference is, that I am using VB

 

(AutoCAD version Civil 2010)

0 Likes
Message 4 of 5

Anonymous
Not applicable

Post in the .NET forum, and include your code because the

crystal ball was sent out to be polished.

0 Likes
Message 5 of 5

Anonymous
Not applicable

problem solved

 

the issue was, that my program was not running in session context, so the last drawing couldn't be closed