.NET

.NET

Reply
*Expert Elite*
Alfred.NESWADBA
Posts: 8,996
Registered: ‎06-29-2007
Message 21 of 23 (176 Views)

Re: My first .NET code with lots of errors, please need help.

04-23-2012 11:21 PM in reply to: anthonyperks8274

Hi,

 

ok, when i start AutoCAD from VS (project in debug-mode), then within AutoCAD I start _NETLOAD and point to youir DLL, the command "helloworld" can be started fine.

 

The only thing I would change is you set Framework to version 3.5, as long as you want to run this app with AutoCAD 2012 you should use 4.0 instead. But that is only necessary for debug-reasons (to get breakpoints and so on).

 

>> but the actual demand loaded command

First: do you agree that your code runs fine when using NETLOAD to load your DLL and then start the command?

If so the problem is not the project or code itsself, it's demand-loading then? What have you done to get this project demand loaded? Played with the plugin-directory or manually set some registry stuff?

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
anthonyperks8274
Posts: 25
Registered: ‎01-30-2011
Message 22 of 23 (153 Views)

Re: My first .NET code with lots of errors, please need help.

04-26-2012 05:31 PM in reply to: Alfred.NESWADBA

Alfred, you are indeed correct in that the program works when I produce a compiled .dll, and load it with _netload. 

 

I actually haven't done anything to my registry settings whatsoever.  The computer I'm working on is a new build (only two weeks old) that I specifically re-initialized so that I could get all of these tools working.  So I'm a bit mystified as to what is causing this problem.  That being said, I'm using a company specific instance of AutoCAD Map, so the only thing I can think is that there is something within that configuration that is causing the problem.  But even then, it should have affected the Plant3D instance.  That is, actually, a raw installation with no configuration loaded whatsoever.  So... hmm... don't know.

 

But as long as the .dll actually works, the question is, do I care?  I can still use it to load the the application, and then just _netload the dll when required.  So it might be just something I put on the back-burner until I have another idea.

 

Thanks for the help.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,996
Registered: ‎06-29-2007
Message 23 of 23 (143 Views)

Re: My first .NET code with lots of errors, please need help.

04-26-2012 10:19 PM in reply to: anthonyperks8274

Hi,

 

so the number of debug-messages you receive from AutoCAD is not your problem ... and should not be your's, it's a problem Autodesk and/or Microsoft should check (and resolve).

 

Also your code runs fine after you did load your DLL with command _NETLOAD. So everything seems to be as designed.

 

Last point I see now is you want to have your tool automatically loaded when your AutoCAD starts.

Three options I read about it:

 

HTH, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
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.