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

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

17 REPLIES 17
SOLVED
Reply
Message 1 of 18
yuh0317
17876 Views, 17 Replies

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

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

17 REPLIES 17
Message 2 of 18
yuh0317
in reply to: yuh0317

The following dlls had been referenced.

 

accoremgd

acdbmgd

acmgd

Autodesk.AutoCAD.Interop

Autodesk.AutoCAD.Interop.Common

 

 

Thanks,

Yu

 

 

Message 3 of 18
hgasty1001
in reply to: yuh0317

Hi,

 

Is Copy Local set to false?

 

Gaston Nunez

Message 4 of 18
yuh0317
in reply to: yuh0317

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

 

Yu

Message 5 of 18
yuh0317
in reply to: yuh0317

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.

Message 6 of 18
yuh0317
in reply to: yuh0317

I add the following references

 

accoremgd

acdbmgd

acmgd

Autodesk.AutoCAD.Interop

Autodesk.AutoCAD.Interop.Common

Message 7 of 18
Alexander.Rivilis
in reply to: yuh0317

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

Message 8 of 18
yuh0317
in reply to: Alexander.Rivilis

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

 

Yu

Message 9 of 18
Alexander.Rivilis
in reply to: yuh0317


@yuh0317 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
yuh0317
in reply to: Alexander.Rivilis

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

Message 11 of 18
Alexander.Rivilis
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.

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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 12 of 18
norman.yuan
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...

 

Message 13 of 18
Balaji_Ram
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

Message 14 of 18

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

 

Message 15 of 18

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

Message 16 of 18

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

 

 

 

 

Message 17 of 18

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


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

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