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

COM Exception during insert

64 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
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.