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

exception: application busy

12 REPLIES 12
Reply
Message 1 of 13
clear_zero
545 Views, 12 Replies

exception: application busy

I created a brackground thread in VB.net. Inside the thread I open dwg files, insert text, close them. The number of the file is more than 1000.

If single-drawing compatibility =true, there is an exception ,application is busy, thrown out randomly.
I wonder what is the reason for that and how to avoid it?

Thanks
12 REPLIES 12
Message 2 of 13
clear_zero
in reply to: clear_zero

Anyone has any idea
Message 3 of 13
Anonymous
in reply to: clear_zero

Hi, clear_zero!
Application busy exception is thrown if AutoCAD execute any command.
You have to wait ending of command or cancel it.
Best Regards,
Alexander Rivilis.
Message 4 of 13
clear_zero
in reply to: clear_zero

Thanks for your reply Alex
if I would like to cancel it? what code I should write?
The exception which AutoCAD trown, is there any differnce between autoCAD messagebox (like do you want to save) and long time running command?

Thanks
Message 5 of 13
Anonymous
in reply to: clear_zero

http://through-the-interface.typepad.com/through_the_interface/2006/08/cancelling_an_a.html
Message 6 of 13
clear_zero
in reply to: clear_zero

I try to use sendcommand to cancel the current command
acadapp.Application.ActiveDocument.SendCommand("???")

what i should put inside of the function?

thanks
Message 7 of 13
Anonymous
in reply to: clear_zero

"\x1B\x1B"
P.S.: I think better solution is wait for little time after "application busy" and try again.

Message was edited by: Alexander Rivilis
Message 8 of 13
clear_zero
in reply to: clear_zero

The exception which AutoCAD trown, is there any differnce between autoCAD messagebox (like do you want to save) and long time running command?

Thanks
Message 9 of 13
Anonymous
in reply to: clear_zero

Sorry, but I can not not understand your's question. 😞
Message 10 of 13
clear_zero
in reply to: clear_zero

I there in some case AutoCAD will popup a message box such as "would you like to save the file"
In VB.net I will receive a exception "the application is busy"

How can I catch the messagebox and send command from VB.net to say yes or no

erm..
If I use AutoCAD i can see the messagebox and press button to say yes or no

In VB.net which way I can do the same thing
Message 11 of 13
Anonymous
in reply to: clear_zero

In which case AutoCAD tell you "would you like to save the file"? May be you try to open another dwg-file before saving previous? Then you need to save previous dwg-file before open another one. Message was edited by: Alexander Rivilis
Message 12 of 13
clear_zero
in reply to: clear_zero

while I am running a AutoCAD application at the moment with Single drawing compatibility mode, open file1 and do something

I create an AutoCAD object from VB.net under the same drawing(Single drawing compatibility) open file1 and do something, then there will be messagebox popup.
My code is open lots dwg file and insert something and close as a thread running in the background.
Message 13 of 13
Anonymous
in reply to: clear_zero

If system variable DBMOD not equal 0 and you try to open another dwg-file AutoCAD will be asked you with popup. You *MUST* save it before.

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost