.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reg. Integrate >NET DLL in COM API Project

3 REPLIES 3
Reply
Message 1 of 4
dhimant.bhensdadia
453 Views, 3 Replies

Reg. Integrate >NET DLL in COM API Project

Hi,

 

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=19.0.0.0, 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 ?

3 REPLIES 3
Message 2 of 4

HI,

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.

 

http://forums.autodesk.com/t5/NET/Could-not-load-file-or-assembly-accoremgd-dll-or-one-of-its/td-p/3...

Message 3 of 4

Can you elaborate little bit more means is it possible to give me the exact reason why it can't be possible ?
Message 4 of 4

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.

http://exchange.autodesk.com/autocad/enu/online-help/search#WS73099cc142f48755-5c83e7b1120018de8c0-2...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost