.NET

Reply
Contributor
ChrisBatt
Posts: 12
Registered: ‎11-21-2011
Message 1 of 16 (609 Views)

netload does not load dll

609 Views, 15 Replies
12-26-2012 01:48 PM

I'm having trouble with my command not loading via a netload in AutoCAD 2012 SP1 64bit running on Windows 7 64bit.  It works on most of my user's computers, but on a couple of the computers it doesn't seem to be doing anything.  I'm using Visual Studio 2010 for coding and debugging, but I don't have debugging software on the computer that is causing the problem.  I've attached my commands class in it's entirety to this post in the hopes that someone can point me in the right direction.  The dll resides local on the user's computer and is not in a network location.  When I run the netload on the development machine or one of my other working users, I get the message boxes and the program seems to run fine, but on the computers that aren't working I get nothing.  No errors, no message boxes, nothing.  Any questions or solutions would be greatly appreciated as I've been trying all sorts of things to see what I can do to resolve the problem.  Thanks in advance.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,484
Registered: ‎06-29-2007
Message 2 of 16 (603 Views)

Re: netload does not load dll

12-26-2012 01:57 PM in reply to: ChrisBatt

Hi,

 

At least when starting command _NETLOAD and pointing to your dll you get some infos at command-line,

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
ChrisBatt
Posts: 12
Registered: ‎11-21-2011
Message 3 of 16 (601 Views)

Re: netload does not load dll

12-26-2012 01:58 PM in reply to: Alfred.NESWADBA

Actually there is no error in the command line.  That is what is really frustrating.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,484
Registered: ‎06-29-2007
Message 4 of 16 (597 Views)

Re: netload does not load dll

12-26-2012 02:01 PM in reply to: ChrisBatt

Hi,

 

>> Actually there is no error in the command line.

I can't beleive that (even tried <F2> to see more lines?), but ok.

Have you tried any of the sample-projects shipped with the ObjectARX-kit? Do they also not load/run?

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
*Expert Elite*
Alfred.NESWADBA
Posts: 8,484
Registered: ‎06-29-2007
Message 5 of 16 (594 Views)

Re: netload does not load dll

12-26-2012 02:10 PM in reply to: ChrisBatt

Hi,

 

an additional idea: remove the INITIALIZE part, if there are exceptions in it the loading of the DLL may fail.

You can try to run your initialize at the first command-start of one of your commands (at least for a test period)

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
ChrisBatt
Posts: 12
Registered: ‎11-21-2011
Message 6 of 16 (592 Views)

Re: netload does not load dll

12-26-2012 02:13 PM in reply to: Alfred.NESWADBA

Hope this makes sense.  Here is my entire command prompt from when I try the netload:

 

Customization file loaded successfully. Customization Group: ACAD

Customization file loaded successfully. Customization Group: AUTOCADWS

Customization file loaded successfully. Customization Group: AUTODESKSEEK

Customization file loaded successfully. Customization Group: CONTENTEXPLORER

Customization file loaded successfully. Customization Group: EXPRESS

Regenerating model.

Command: _RIBBON

Command: COMMANDLINE

Command: acenav

Command:

Command:

Command: NETLOAD

Command: PID

Unknown command "PID".  Press F1 for help.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,484
Registered: ‎06-29-2007
Message 7 of 16 (591 Views)

Re: netload does not load dll

12-26-2012 02:18 PM in reply to: ChrisBatt

Hi,

 

"unknown command" does not necessarily mean "DLL not loaded". This also happens when you used the wrong framework for creating your DLL or any defects in the framework-installations.

Try my two tips above, remove the INITIALIZE sequence in your project for test and try to load another DLL from any other project.

 

HTH, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
ChrisBatt
Posts: 12
Registered: ‎11-21-2011
Message 8 of 16 (588 Views)

Re: netload does not load dll

12-26-2012 02:27 PM in reply to: Alfred.NESWADBA

Alright, I tried loading a different dll and this one worked correctly.  I also removed the initialize code completely and removed the IExtensionApplication inheritance my commands class.  The problem still exists on my one computer, but loads correctly on my other computer. 

*Expert Elite*
Alfred.NESWADBA
Posts: 8,484
Registered: ‎06-29-2007
Message 9 of 16 (585 Views)

Re: netload does not load dll

12-26-2012 02:34 PM in reply to: ChrisBatt

Hi,

 

>> I tried loading a different dll [...] I also removed the initialize code

Wow, you are fast! :smileywink:

 

>> The problem still exists on my one computer, but loads correctly on my other computer.

What are the differences between those workstations (os, os servicepack, AutoCAD + SP, installed Frameworks, ...)

If on the "defect system" other DLLs work well I would start to do two things:

  • look that "local copy" for the references from AutoCAD (acmgd and acdbmgd) is set to false ...because if you copy them to the destination directory of your DLL ... and these DLLs are from another AutoCAD servicepack then your AutoCAD you also may get the problem with unknown command.
  • try to repair Framework-installations
  • copy/paste your code from the none-functional project into the test-project

 

Good luck,  - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Mentor
Posts: 370
Registered: ‎05-06-2012
Message 10 of 16 (545 Views)

Re: netload does not load dll

12-27-2012 01:58 AM in reply to: ChrisBatt

Open the Registry editor, and go to the registry key where your application is creating the demand-load entries, and delete the entire key so that there is no demand-loading of your app to confuse things.

 

My guess is that AutoCAD is loading another copy of your assembly at startup, or when your command is issued.

 

If you're developing and use demand-loading you need to be sure that the location of the assembly in the registry is the same as the location of the assembly you're building and testing.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community