.NET

Reply
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 11 of 16 (108 Views)

Re: Problem with registering AutoCAD commands in .NET

05-08-2006 05:57 AM in reply to: afirmation
afirmation,

So did you try some of the things I had suggested?

Also, why is AutoCAD on your E: drive? I am assuming that Windows is on your C: drive, you may be having a problem of .NET and/or AutoCAD can't 'see' each other. On my PC I have an entry in the path of 'c:\program files\common files\autodesk shared\;'. You could also try and install AutoCAD on your C: drive.

Hmmm......also, try to remove all references to AutoCAD: Interop, Managed, etc and re-add them.

And finally, are you able to run and/or debug AutoCADs examples? Are you having the same problem with those as well? You really need to try and run those to see if they work. Granted, most of them don't add command buttons, but you can netload and type in the command names to see if you can run/debug.

Samples and Documentation:
http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=773180

ObjectARX:
http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=785550

Developer Center (provides a link to 'AutoCAD .NET Labs' zip file):
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 12 of 16 (108 Views)

Re: Problem with registering AutoCAD commands in .NET

05-08-2006 08:58 AM in reply to: afirmation
afirmation,

Ok try the attached project.

I did find for some reason that when I loaded your test project that the library stole was from ver 1.1 of the framework.

Basically, I rebuilt your project from scratch. Try to build/debug it on your end.

Let us know how it works

C
Distinguished Contributor
afirmation
Posts: 147
Registered: ‎04-19-2006
Message 13 of 16 (108 Views)

Re: Problem with registering AutoCAD commands in .NET

05-09-2006 01:28 AM in reply to: afirmation
It WORKKKKKSSSS, you can see how happy I am.

1). First I built your sample which worked great. So I tried to make a project of my own from zero. Of course it didn't work; I copied all your classes still didn't work. Hmm ... I tried the project settings, they were the same, so that wasn't the problem., but something was still wrong.

So, I thought about the DLLs. I removed and added the DLL's for AutoCAD: acdbmgd, acmgd, Autodesk.AutoCAD.Interop and Autodesk.AutoCAD.Interop.Common and set their "Copy Local" property to false. Now it WORKED.

I tried to figure out why the commands did not work if the AutoCAD DLL's where local copied, but I didn't have any success. What I realized is that not all the dll's are the problem, but only the "acmgd.dll" which must not be local copied.

If you know why, please explain me cause I'm very curious.

2). What is the problem with debugging I don't really understand. For me it works fine. I run the solution in debug mode and set some breakpoints. In AutoCAD I netload my dll and my breakpoints fire. So, it's okay for me.

3). Why shouldn't I put my plugin dlls in the ..\Program Files\AutoCAD 2007\ .. directory?

Thanks a lot, now I can move on to other problems :smileyhappy:
New Member
pnikoletich
Posts: 2
Registered: ‎02-19-2007
Message 14 of 16 (108 Views)

Re: Problem with registering AutoCAD commands in .NET

07-27-2007 09:15 AM in reply to: afirmation
I ran into the same problem. Thefix taht worked for me was to set the startup directory for debugging to your AutoCAD folder and then set AutoCAD as your start up application. Should fix it for future people that come across this post.
New Member
LOGIN
Posts: 1
Registered: ‎10-29-2007
Message 15 of 16 (108 Views)

Re: Problem with registering AutoCAD commands in .NET

10-29-2007 03:53 AM in reply to: afirmation
COD REGISTERY AUTOCAD 2007
Member
diordonez
Posts: 4
Registered: ‎05-07-2008
Message 16 of 16 (108 Views)

Re: Problem with registering AutoCAD commands in .NET

04-17-2009 08:12 AM in reply to: afirmation
Thank you. I had the same problem but "setting the startup directory" worked very well.
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.