.NET

Reply
Valued Contributor
dhimant.bhensdadia
Posts: 57
Registered: ‎04-18-2013
Message 1 of 4 (195 Views)

Reg. Integrate >NET DLL in COM API Project

195 Views, 3 Replies
03-03-2014 10:46 PM

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 ?

Mentor
mzakiralam
Posts: 231
Registered: ‎11-09-2012
Message 2 of 4 (189 Views)

Re: Reg. Integrate >NET DLL in COM API Project

03-04-2014 12:08 AM in reply to: dhimant.bhensdadia

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...

Valued Contributor
dhimant.bhensdadia
Posts: 57
Registered: ‎04-18-2013
Message 3 of 4 (154 Views)

Re: Reg. Integrate >NET DLL in COM API Project

03-05-2014 09:39 AM in reply to: mzakiralam
Can you elaborate little bit more means is it possible to give me the exact reason why it can't be possible ?
Mentor
mzakiralam
Posts: 231
Registered: ‎11-09-2012
Message 4 of 4 (138 Views)

Re: Reg. Integrate >NET DLL in COM API Project

03-06-2014 02:59 AM in reply to: dhimant.bhensdadia

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...

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.