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
Solved! Go to Solution.
Solved by DiningPhilosopher. Go to Solution.
Solved by norman.yuan. Go to Solution.
The following dlls had been referenced.
accoremgd
acdbmgd
acmgd
Autodesk.AutoCAD.Interop
Autodesk.AutoCAD.Interop.Common
Thanks,
Yu
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.
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
Yes, I want to create standalone exe-file. And run AutoCAD 2013 in the background in the silent mode.
Yu
@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
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
@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
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:
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
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....
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
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...
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.
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