Author Topic: Unknown command message  (Read 2973 times)

0 Members and 1 Guest are viewing this topic.

tik

  • Guest
Unknown command message
« on: September 11, 2012, 05:03:38 PM »
Hi all,

First of all I want to start with saying sorry for asking a question related to autocad 2007. I am sure someone in this forum will have some suggestions or ideas to help this poor soul.

I am using visual studio 2010 with .net 2.0 as the target framework to build/test (backwards compality) this plugin for 2007,2008,2009 autocad. I have breakpoints in my Initialize function and when I do netload all my break points are being hit. But when I type any command in my plugin dll i am getting "unknown command" message.

Please help me.

Tik.

BlackBox

  • King Gator
  • Posts: 3770
Re: Unknown command message
« Reply #1 on: September 11, 2012, 05:51:16 PM »
... How is your compiled assembly being NETLOADed into your debug session?  :?
"How we think determines what we do, and what we do determines what we get."

LE3

  • Guest
Re: Unknown command message
« Reply #2 on: September 11, 2012, 06:04:04 PM »
or maybe it was added this on some of your assemblies:
[assembly: CommandClass(typeof(ClassLibrary.ANYClass))]
remove it or add it on the other assemblies.

BlackBox

  • King Gator
  • Posts: 3770
Re: Unknown command message
« Reply #3 on: September 11, 2012, 06:13:08 PM »
It sounds to me like they went to debug from IDE, and expected the assembly to be loaded for them... They either need to manually NETLOAD, add an autoloader registry key, or (what I do for debugging is to) load a Script from the Command Line Arguments in the solution's properties as the 'debug' Drawing1.dwg is located in the ..\bin\debug\ folder.

Works well while in IDE, yet leaves no 'residue' in the registry when I build for release. Lemon squeezy.
"How we think determines what we do, and what we do determines what we get."

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Unknown command message
« Reply #4 on: September 11, 2012, 07:34:26 PM »

Regarding using a script to NetLoad the DLL in debug mode :

Re: Getting off the Ground with .NET
« Reply #29 on: 2011-04-19, 23:15:52 »
http://www.theswamp.org/index.php?topic=37707.msg429907#msg429907

and « Reply #32 on: 2011-04-20, 00:40:17 » in the same thread

Regards
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

tik

  • Guest
Re: Unknown command message
« Reply #5 on: September 12, 2012, 08:19:22 AM »
RenderMan
Quote
How is your compiled assembly being NETLOADed into your debug session?

I am using visual studio to start Autocad 2007 and after that I am manually loading the plug in by using netload command to browse to the dll location and load it.  Here is an other interesting thing I am seeing, if I start my autocad without visual studio and do netload of my plug in, from that point all commands in the plug in dll works fine. I am seeing the odd behavior only when I start CAD using visual studio.

After starting CAD i tried to attach the process (acad.exe) in visual studio so that I can debug and that didn't work either.

Again thanks to every one who replied to my initial post and I really appreciate any help or suggestions.


tik

  • Guest
Re: Unknown command message
« Reply #6 on: September 12, 2012, 09:54:51 AM »
Here is the good news about my problem. I was using trail version of Autocad 2007 mechanical for my testing. Today I finally I got the activation key for my CAD and once I activated it every thing is working fine, in other words I can debug my command code in visual studio 2010.

Once again thanks to every one for trying to help me.