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

COM Exception during insert

0 REPLIES 0
Reply
Message 1 of 1
chad_boss
177 Views, 0 Replies

COM Exception during insert

This is sort of a strange scenario. I have a .NET app that calls some ancient LISP routines to insert blocks into a users AutoCAD drawing. So far, so good. However, if the user happens to be in the middle of another command, a com exception (call rejected.....)would be thrown. This was easy enough to solve using the SendKeys function to send escape chars to AutoCAD prior to entering the block insertioon code. I've also seen other resolutions to the same issue on this forum.

My question is this. If a user goes to insert a block using my .NET app, and then, while they are placing the block, happen to do a transparent zoom or pan, the same com exception is thrown. Now, I can catch the exception, but when I do that my app comes to the foreground. If I click bach over to AutoCAD, my block is sitting on the users cursor waiting to be inserted.

Does anybody know a more effective way of handling the "Call Rejected..." exceptions that may occur due to the users use of of transparent AutoCAD commands while our code is executing.

Thanks in advance for any advice.
0 REPLIES 0

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