Autocad loading dll twice

Autocad loading dll twice

Anonymous
Not applicable
1,299 Views
6 Replies
Message 1 of 7

Autocad loading dll twice

Anonymous
Not applicable

On my windows 10 manchine, my autocad and the rest of the autodesk products works well when I did the reference to the correct files and set copy local to false.

 

In my previous post I did mention that I have a problem with my plugins I wrote and tried to install them on other machines.

 

Now, on the windows 7 machine, I am setting all my references which applies to the autodesk products copy local to true. Now it loads, but it now loads the same plugin twice and not once.

 

Please help....

0 Likes
1,300 Views
6 Replies
Replies (6)
Message 2 of 7

Keith.Brown
Advisor
Advisor

Can you explain why you think that AutoCAD is loading your dll twice?

 

As far has a I know it is impossible for AutoCAD to load a dll more than once.  It just does not make sense.  You can test this yourself by attempting to netload your plugin more than once.  You can place a write to the command line in your plugins initialize method so you can see some text being written to the screen when it loads.  You will see this text written the first time you load but not the second as AutoCAD will not process the second netload as it is already loaded.

 

Can you imagine the havoc and chaos that would happen if dlls were allowed to be loaded more than once?  Imagine a plugin that uses 3rd Party controls such as Telerik or DevExpress.  These control dlls can be quite large.  Can you imagine the amount of memory that would be consumed if the control dlls were added several times each?

 

Maybe if you describe the issue that you are having someone might be able to diagnose it.

0 Likes
Message 3 of 7

Anonymous
Not applicable

Now that I have installed and not copied the objectarx folders, now it doesnt want to do anything at all, even with the local copy set to true!

0 Likes
Message 4 of 7

Anonymous
Not applicable

here is preview of my code, it works perfectly on windows 10, and now it doesnt want to work on windows 7 at all!!

0 Likes
Message 5 of 7

Keith.Brown
Advisor
Advisor

The dll files that you are referencing are solely for use in Visual Studio while developing.  When running your plugin it will run using the dll's located in the autocad install directory.  Setting copy to local = true will disturb this process.  You can set Copy To Local = true in visual studio if you also set the working directory to the Autocad directory.  This will force your plugin to first look in the Autocad directory for its required dlls instead of the local directory.

 

You have still failed to mention what is wrong with your plugin.  Saying it won't do anything does not really help.  What does it do when you try to debug it?  Have you set a breakpoint in the intitialize method (if you have one) to see what is happening?  Have you set a breakpoint in a command method to see what is happening when the code tries to run?  These are all valid and very basic questions that need to be addressed/answered. 

0 Likes
Message 6 of 7

Anonymous
Not applicable
It is not entering the breakpoints at all.

It is not loading the dll's at all. I am not sure what is wrong

--
Kind Regards

MDavel
0 Likes
Message 7 of 7

Keith.Brown
Advisor
Advisor

Are you saying that it is not running using the autoloader mechanism of AutoCAD or it is not running inside of a visual studio session.  These are two decidedly different things.  You posted a pic of your plugin in an AutoLoader location but you are speaking as if you are running in a visual studio session.  Can you please clarify?

 

Also, are you using the save version of AutoCAD on the Win7 machine that you are using on the Win10 machine?  The autoload directories can be different depending on your version of autocad as well as the dlls that need to be referenced.

0 Likes