Active Member
Posts: 8
Registered: ‎11-02-2005
Message 1 of 1 (63 Views)

COM Exception during insert

63 Views, 0 Replies
11-02-2005 01:48 PM
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.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!