Ensuring your AutoCAD .net DLL runs on another computer - How to set it all up? (AutoCAD .net API)
Please follow the follow steps to ensure that your .net dll works:
Notes for the plugin user:
The first and most important thing:
-
Make sure you have the dll and additional dependencies required.
-
Put the dll in a “trusted” location. Please refer to: #1: http://www.ccadinc.com/autocad-tutorials-trusted-locations.html .
-
Make sure that you have downloaded and installed .Net. Get the latest version: https://www.microsoft.com/net/download/framework
-
You need to find your AutoCAD folder. It is somewhere in the vicinity of: C:\Program Files\Autodesk\Your Version but that may vary depending on the version of Windows you are using and where AutoCAD is installed. Important: (a) Make sure you have admin privileges to edit the config file and (b) please make sure that AutoCAD is not running. Anyways go to your installation folder. Now look for your acad.exe.config file. Here’s mine:
Open that file in some sort of word processor. And you need to edit that file. You need to add the following lines to it:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
So then your acad.exe.config file should look something like this:
Don’t forget to ensure that you can load from remote sources too!
And your .net dll should be able to work!
Help! Exception in acmgd.dll ARX Command - Unhandled Exception E0434F4D
ok in order to solve this, you need to navigate to the following folder:
C:\Windows\Microsoft.NET\Framework\
Now click select the latest version of .Net you have. For me it was v4.0……..etc but you’ll have to click on which ever is your latest version. Then navigate to the Config folder.
C:\Windows\Microsoft.NET\Framework\v4.0….yoursMayBeDifferent\Config
And then you need to find the machine.config file. See picture below. You need to ensure that the machine.config file has read & execute as well as read permissions, for the users group.
-
Right click on the machine.config file with your mouse.
-
Click on the Security tab.
-
Go to users.
-
Check whether the correct permissions are allowed. The “Users” group needs: (i) Read & Execute as well as (ii) Read permissions.
-
If that group doesn’t have those permissions you need to change them. You might require admin access.
-
Press Ok etc.
Here is a gif showing you how to get all of that done.
Notes for the plug-in developer:
-
Users may face memory problems etc. Please confirm that these sorts of issues are not causing the problem.
-
Make sure – if you’re using an installer - that it is correctly set up. Check out this StackOverflow answer: http://stackoverflow.com/a/33381308/4880924
Hope this helps.
Ben