Reputation: 1
I have developed a plugin to automate some work in AutoCAD using C# and AutoCAD managed API references. while adding reference in project, I have provided absolute path of accoremgd.dll,acdbmgd.dll,acmgd.dll from AutoCAD installation folder. how can I give these references in deployment as we can't copy these dlls ? how will I use my result dll plugin on other's system ?
Upvotes: 0
Views: 2284
Reputation: 442
I have developed a plugin to automate some work in AutoCAD using C# and AutoCAD managed API references. while adding reference in project, I have provided absolute path of accoremgd.dll,acdbmgd.dll,acmgd.dll from AutoCAD installation folder. how can I give these references in deployment as we can't copy these dlls ?
As mentioned above the references will be added when you deploy your dll as long as the path to the installation folder remains the same on your client's machine.
how will I use my result dll plugin on other's system ?
There are a few different ways to do this some of which have already been mentioned. The best way to do this is probably using the .bundle format. You can find more documentation about that here https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/AutoCAD-Customization/files/GUID-40F5E92C-37D8-4D54-9497-CD9F0659F9BB-htm.html
Basically it works by creating a folder with the name YourPlugin.bundle
and in the folder you have a PackageContents.xml
that tells AutoCAD how to load and run your project.
Upvotes: 1
Reputation: 1870
You don't need to worry about those references, you just deploy your dll. Assuming that your users have AutoCad installed, all the dlls that your project references reside in the same directory as acad.exe
and will be automatically visible to the application. For this reason, the fact that your project targets the dlls in a specific location does not matter.
To deploy, it will work very much the same way as it does on your system. You just need to set up auto-loading. Basically, two of the best options is to either use the registry or use one of acad.lsp
or acaddoc20xx.lsp
to NETLOAD your dll on startup. This article will guide you through both techniques. Also see this answer and others in the thread.
Upvotes: 1