I am trying to create a DLL which includes AutoCAD.Net functionality that is callable from VBA within AutoCAD. I want to be able to run some AutoCAD.Net code in a large existing VBA application.
To start off I created a simple DLL that contained no AutoCAD functionality that works by checking "Make assembly COM-visible" and "Register for COM interop".
I then created a DLL with some AUOCAD.Net functionality (CreateExtrudedSolid) but I get the following error
during the build:
Could not load file or assembly 'accoremgd, Version=23.0.0.0, Culture=neutral, PublicKeyToken=null'
or one of its dependencies. The system cannot find the file specified.
I am using Windows 10, .Net Framework 4.7.1, Visual Stuio 2017, AutoCAD 2019 and by class imports the following:
Autodesk.AutoCAD.ApplicationServices
Autodesk.AutoCAD.DatabaseServices
Autodesk.AutoCAD.Geometry
Autodesk.AutoCAD.Runtime
I have added the following references
accoremgd.dll
acdbmgd.dll
acmgd.dll
AcWindows.dll
Autodesk.AutoCADInterop.dll
Autodesk.AutoCADInterop.Common.dll
How do I make this work?
Thanks for your help.