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.
Hi,
At least when starting command _NETLOAD and pointing to your dll you get some infos at command-line,
- alfred -
Actually there is no error in the command line. That is what is really frustrating.
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 -
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 -
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.
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 -
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.
Hi,
>> I tried loading a different dll [...] I also removed the initialize code
Wow, you are fast! 😉
>> 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:
Good luck, - alfred -
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.
Alright here is what I have tried now thanks to the two previous posts. I made sure that the reference "Copy Local" was set to false which it was. I tried repairing the .Net Installations. The development PC is Windows 7 Enterprise 64-bit with SP1 and the PC that I am having trouble with is Windows 7 Ultimate 64-bit SP1. They both have the same versions of .NET framework. I also checked the registry and there are no records for my new dll that I was trying to have created on demand loading. I made sure that there weren't any other records and conflicts pertaining to the registry. After all of this I tried again and to no avail. The problem still persists on one PC. I have about 15 PCs running Windows 7 64-bit Enterprise and Ultimate with SP1 which all seem to work fine. They are all running the same version of AutoCAD 2012 SP1. I have also tried a reinstall of AutoCAD just to see if this was causing an issue. Any other thoughts or suggestions...
Here is my .csproj for your review. I changed the extension to .txt so that I could upload it to the site. Thanks a bunch.
There's quite a few potential causes for the problem, starting with your referencing of the AutoCAD COM interop assemblies, which is something I would avoid like the plague.
The other issue is that your project has a deployment setup that will attempt to install required components if they are not already installed. I'm not sure you need that with an AutoCAD extension because the prerequsite components are required by AutoCAD, so they have to be installed already, and the bootstrapping process could have a role in the failure.
The problem is difficult to diagnose because there are third-party components involved, and any one of them could potentially cause the failure.
So, I would start by making sure that all of the third-party components required by your app are installed.
If you still can't identify the cause of the problem, then I would resort to the fusion log:
http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx
Have a look at this Swamp post. Attached to it is a tool that may identify the cause of the failure. It can detect several possible causes of unrecognized commands when an assembly is loaded:
Alright, I've finally got some time to get back to this problem after the New Year. After trying the MYNETLOAD diagnostic tool without any luck. I resigned myself to removing the references on other programs and found out that my problem fell upon a bad install of crystal reports. I got the program to work without the references and added one thing after another back in and it always didn't work after I added the crystal reports references. I then uninstalled crystal reports from the problem pc and then reinstalled and tried the program again. This time everything worked as inteneded. I appreciate all of the assistance in solving this problem as I now have lots of tools and options that I wasn't aware of at the beginning to try and troubleshoot these types of problems in the future. Kudos to you all for being so helpful and getting me pointed in the right direction.
Can't find what you're looking for? Ask the community or share your knowledge.