Jump to content

Debugging Autocad with c# .net and vs2010 or 2008


plantdesign

Recommended Posts

I have been trying for about a week now to step through my code that is running an Autocad custom dll. In this case, it's "Hello World" - I have all of the publicly available ObjectARX libraries.

 

I have tried a number of methods but the only way I can get the de****** to stop at a break point is to create a "Autocad Plugin" when I create a new project. If I just try to create a class library, it doesn't load the symbols (?) when I run the debug.

 

The problem with debugging the "autocad plugin" is that it doesn't wait for me to key in the customCommand.

 

I am very new to .net programming but come from a vb6/vba background, just never for Autocad. Can someone step me through how to do debug with either vs2008 or vs2010 and Autocad 2010 or 2011?

 

Any help is greatly appreciated.

Link to comment
Share on other sites

The problem with debugging the "autocad plugin" is that it doesn't wait for me to key in the customCommand.

 

Elaborate on that statement: What is the sequence of events?

Link to comment
Share on other sites

The dll is a program Kean Walmsley wrote

 

http://through-the-interface.typepad.com/through_the_interface/2007/02/getting_access_.html

 

it should wait for me to key in "EH" before it does anything else. When I netload the dll however, it goes right to "enter the handle of the object" instead of waiting for me to key in "EH".

 

Is it possible to debug without having to create a Autocad Plugin?

 

Thanks!

Link to comment
Share on other sites

The dll is a program Kean Walmsley wrote

 

http://through-the-interface.typepad.com/through_the_interface/2007/02/getting_access_.html

 

it should wait for me to key in "EH" before it does anything else. When I netload the dll however, it goes right to "enter the handle of the object" instead of waiting for me to key in "EH".

 

 

That’s interesting; I’ve never run into that before. Does the routine proceed correctly from there?

 

 

Is it possible to debug without having to create a Autocad Plugin?

 

Thanks!

 

 

Many of the .NET objects and methods used in that sample routine require the“in-process” accessibility available only through the plug-in setup. There is an “out of process” interface (COM Interop) that allows interaction, without actually running inside of AutoCAD, but much of the functionality is unavailable. Conceivably, debugging such a setup could occur (at least partially) without AutoCAD running.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...