I have created one Class Library projects that return the List of start and end point of all Lines in the active drawing.
And the same List I want to use in the project that created by COM API (EXE project).
so I have added that DLL file in this EXE project and when that function is calling I am getting the error as mentioned below :
Could not load file or assembly 'Acdbmgd, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Can anyone please suggest me whether this type of integration is possible or not ? if not possible then its ok but if yes then how ?
I think you can not do something like this. That DLL is made for AutoCAD application not for your custom application. Please have a look on below link where this kind issue is discussed.
The reason was mentioned in the link which I have refered to you. You can have a look below.
"The reason why AutoCAD's managed API cannot be used from another process is because it is dependent on AutoCAD itself, and on AutoCAD DLLs that cannot be loaded into another process. For example, some managed APIs call code in acad.exe, which you can't load into your application. "
Actually your standalone application is a out-of-process. And AutoCAD .NET API is designed to run in-process only. you can have a look on below link as well.
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!