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

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

Anonymous
Not applicable
22,971 Views
17 Replies
Message 1 of 18

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

Anonymous
Not applicable

Hi All,

 

I want to create a silent acad process in background and do some works, it works well in AutoCAD 2012. But when I upgrade to AutoCAD 2013, it cannot works. I already had referenced accoremgd.dll. It compiles well, I get the errors "Could not load file or assembly 'accoremgd.dll' or one of its dependencies . The specified module could not be found." when I run my program. Who can tell me what dlls i lose to referenced.

 

Thanks,

Yu

Accepted solutions (2)
22,972 Views
17 Replies
Replies (17)
Message 2 of 18

Anonymous
Not applicable

The following dlls had been referenced.

 

accoremgd

acdbmgd

acmgd

Autodesk.AutoCAD.Interop

Autodesk.AutoCAD.Interop.Common

 

 

Thanks,

Yu

 

 

0 Likes
Message 3 of 18

hgasty1001
Advisor
Advisor

Hi,

 

Is Copy Local set to false?

 

Gaston Nunez

Message 4 of 18

Anonymous
Not applicable

No matter the value is false or true. The issue is still reproducible. 

 

Yu

0 Likes
Message 5 of 18

Anonymous
Not applicable

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

 

I only create a database object, there is a exception message "Could not load file or assembly 'accoremgd, Version=19.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

 

AutoCAD 2013 32-bit.

 

I have attached sample codes.

0 Likes
Message 6 of 18

Anonymous
Not applicable

I add the following references

 

accoremgd

acdbmgd

acmgd

Autodesk.AutoCAD.Interop

Autodesk.AutoCAD.Interop.Common

0 Likes
Message 7 of 18

Alexander.Rivilis
Mentor
Mentor

Are you trying to create standalone exe-file?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 8 of 18

Anonymous
Not applicable

Yes, I want to create standalone exe-file. And run AutoCAD 2013 in the background in the silent mode.

 

Yu

0 Likes
Message 9 of 18

Alexander.Rivilis
Mentor
Mentor

@Anonymous wrote:

Yes, I want to create standalone exe-file. And run AutoCAD 2013 in the background in the silent mode.

 

Yu


It is impossible using acdbmgd.dll, acmgd.dll and accoremgd.dll in standalone exe-file.

Its can be using only in dll-file which loaded into AutoCAD.

So you can use:

Autodesk.AutoCAD.Interop

Autodesk.AutoCAD.Interop.Common

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 10 of 18

Anonymous
Not applicable

Actually I want to use some class in the acdbmgd.dll, acmgd.dll and accoremgd.dll in standalone exe-file. 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.

 

YU

0 Likes
Message 11 of 18

Alexander.Rivilis
Mentor
Mentor

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

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 12 of 18

Norman_Yuan
Mentor
Mentor
Accepted solution

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

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 13 of 18

Balaji_Ram
Alumni
Alumni

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

0 Likes
Message 14 of 18

Anonymous
Not applicable

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

 

0 Likes
Message 15 of 18

Alexander.Rivilis
Mentor
Mentor

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)

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 16 of 18

Anonymous
Not applicable

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

 

 

 

 

0 Likes
Message 17 of 18

DiningPhilosopher
Collaborator
Collaborator
Accepted solution

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.

 

 

Message 18 of 18

Alexander.Rivilis
Mentor
Mentor

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

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes