.NET

Reply
Active Member
chad_boss
Posts: 7
Registered: ‎11-02-2005
Message 1 of 1 (59 Views)

COM Exception during insert

59 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.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.