.NET

Reply
*perry
Message 1 of 8 (233 Views)

commandMethod quit working?

233 Views, 7 Replies
05-15-2006 10:41 AM
I moved some code from .Net for 2006 over to Acad2007
and now none of my CommandMethods work while stepping
through code in the debugger. I just get "unknown command"
at the Acad prompt. What happened?
Perry
*perry
Message 2 of 8 (233 Views)

Re: commandMethod quit working?

05-18-2006 07:45 AM in reply to: *perry
perry wrote:
> I moved some code from .Net for 2006 over to Acad2007
> and now none of my CommandMethods work while stepping
> through code in the debugger. I just get "unknown command"
> at the Acad prompt. What happened?
> Perry
Nothing?
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 3 of 8 (233 Views)

Re: commandMethod quit working?

05-18-2006 09:04 AM in reply to: *perry
Perry,

Your gonna have to give us some more info.

It sounds like AutoCAD is not loading your dll.

FYI, Include some example code. Better yet, a sample project, especially for a problem like this.

C
*perry
Message 4 of 8 (233 Views)

Re: commandMethod quit working?

05-18-2006 09:40 AM in reply to: *perry
CougerAC wrote:
> Perry,
>
> Your gonna have to give us some more info.
>
> It sounds like AutoCAD is not loading your dll.
>
> FYI, Include some example code. Better yet, a sample project, especially for a problem like this.
>
> C
If Acad was'nt loading the dll, doesnt seem like I'd be able to step through it in the first place,
which I can, its just that if alt-tab over to Acad and type in a command name I just get a "unknown
command" rather than jumping back to the debugger at the appropriate command.
When not debugging, acad loads the dll (the debug version, there is no release version) and the commands
work.
I have defined them in code like this:

[CommandMethod("tbgather")]
public void add()
{...}

So what I have been doing is just place calls to the "commands" inside constructors
Distinguished Contributor
wesbird
Posts: 359
Registered: ‎12-05-2003
Message 5 of 8 (233 Views)

Re: commandMethod quit working?

05-18-2006 09:47 AM in reply to: *perry
change to
public static void add()
Vault Pro 2014, Windows 7 64 bit, AutoCAD (ACA, Map) 2014
*perry
Message 6 of 8 (233 Views)

Re: commandMethod quit working?

05-18-2006 01:13 PM in reply to: *perry
weslleywang wrote:
> change to
> public static void add()

Tried that, no difference.
Again, this only happens when stepping through code with the debugger
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 7 of 8 (233 Views)

Re: commandMethod quit working?

05-18-2006 02:37 PM in reply to: *perry
Perry,

Try this....

http://jtbworld.blogspot.com/2006/04/debug-net-dlls-in-autocad-2007.html

C
*perry
Message 8 of 8 (233 Views)

Re: commandMethod quit working?

05-18-2006 02:55 PM in reply to: *perry
CougerAC wrote:
> Perry,
>
> Try this....
>
> http://jtbworld.blogspot.com/2006/04/debug-net-dlls-in-autocad-2007.html
>
> C
THAT DID IT!!!!!!!
Thank you !!!!!
I'm gonna print that page and put it prominently into my binder
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
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.