.NET

Reply
Moderator
Alexander.Rivilis
Posts: 1,388
Registered: ‎04-09-2008
Message 11 of 18 (1,582 Views)

Re: Could not load file or assembly 'accoremgd.dll' or one of its dependencies.

09-12-2012 06:30 AM in reply to: yuh0317

yuh0317 wrote:

... Do you know any other ways to use some class in the acdbmgd.dll, acmgd.dll and accoremgd.dll except load my dlls by AutoCAD...


There is no way to do that.

 


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

*Expert Elite*
norman.yuan
Posts: 944
Registered: ‎04-27-2009
Message 12 of 18 (1,580 Views)

Re: Could not load file or assembly 'accoremgd.dll' or one of its dependencies.

09-12-2012 06:36 AM in reply to: yuh0317

With code like this:

 

Autodesk.AutoCAD.DatabaseServices.Database db = new Autodesk.AutoCAD.DatabaseServices.Database(false, true);

 

It is absolutely impossible to use it in a standalone EXE (as the other reply poited out) since the very begining of AutoCAD .NET API (Acad2005). Yet, you claimed that your code worked with Acad 2012? What was your magic then?

 

Anyway, since you use Acad2013, and want to run "silent" instance of AutoCAD, how about Acad2013 Core Console, a non-graphical AutoCAD instance. See this post from Kean:

 

http://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console...

 

ADN Support Specialist
Balaji_Ram
Posts: 660
Registered: ‎03-21-2011
Message 13 of 18 (1,542 Views)

Re: Could not load file or assembly 'accoremgd.dll' or one of its dependencies.

09-26-2012 06:51 AM in reply to: yuh0317

You may also be interested in this link in addition to what norman yuan had mentioned.

http://adndevblog.typepad.com/autocad/2012/04/getting-started-with-accoreconsole.html

 



Balaji
Developer Technical Services
Autodesk Developer Network

New Member
ponguruswamy
Posts: 2
Registered: ‎01-20-2013
Message 14 of 18 (1,356 Views)

Re: Could not load file or assembly 'accoremgd.dll' or one of its dependencies.

01-28-2013 06:53 AM in reply to: Alexander.Rivilis

Hello All,

 

I have similar requirement of loading the AutoCAD's dll's in .Net environment.(Want to do it wthout using AutoCAD interop - COM)

 

 

I can see it from the post that it is not possible to do it in stand alone exe's.

 

But it would be great if any one can provide technical reasoning for the same, that why it is not possible to do it ?

 

I appreciate your help.

 

Thanks....

 

Moderator
Alexander.Rivilis
Posts: 1,388
Registered: ‎04-09-2008
Message 15 of 18 (1,350 Views)

Re: Could not load file or assembly 'accoremgd.dll' or one of its dependencies.

01-28-2013 07:39 AM in reply to: ponguruswamy

I do not think I should describe WHY. Consider that it is a policy of Autodesk. The main thing is to know that you can not use the dll-files out of the process acad.exe (or other host-processes such as AutoCAD Civil3d, AutoCAD Architecture, AutoCAD Core Console, etc.) Impossible means that it is impossible. 

Out-of-Process Versus In-Process (.NET)


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

New Member
ponguruswamy
Posts: 2
Registered: ‎01-20-2013
Message 16 of 18 (1,324 Views)

Re: Could not load file or assembly 'accoremgd.dll' or one of its dependencies.

01-29-2013 01:00 AM in reply to: Alexander.Rivilis

Ok, Thank you for your reply and URL. It explains the reasoning which I want.

 

I am using COM to interface with AutoCAD and I am happy with that. But does AutoCAD has plans to continue with COM in future versions ?

If yes, then I will continue using it.

and if no, then I need to look for other options to do it. (please reply if you know a better approach than COM.)

 

Thanks in advance...

 

 

 

 

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 17 of 18 (1,319 Views)

Re: Could not load file or assembly 'accoremgd.dll' or one of its dependencies.

01-29-2013 01:43 AM in reply to: ponguruswamy

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.  

 

Some of AutoCAD's components (the parts that allow access to Databases and object in them) can be loaded into another process with a RealDWG license.

 

 

Moderator
Alexander.Rivilis
Posts: 1,388
Registered: ‎04-09-2008
Message 18 of 18 (1,304 Views)

Re: Could not load file or assembly 'accoremgd.dll' or one of its dependencies.

01-29-2013 02:36 AM in reply to: ponguruswamy

ponguruswamy wrote:

I am using COM to interface with AutoCAD and I am happy with that. But does AutoCAD has plans to continue with COM in future versions ?


Autodesk has not announced plans to stop supporting COM in future versions of AutoCAD - so I hope COM will be supported at least in the next version.


ponguruswamy wrote:
... if no, then I need to look for other options to do it. (please reply if you know a better approach than COM.)

I would recommend using AutoCAD .NET API for creating plugins (dll-files) that work inside (in-process) AutoCAD, or (as DiningPhilosopher proposed) license RealDWG


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community