.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
can't load assembly acmgd.dll
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi
I have been trying to interface to AutoCAD from my VS 2010 project without luck.
My environment is 64bit windows 7 environment. I installed on my computer AutoCad 2012 and ObjectARX 2012.
I created a basic hello world project where I referenced the AcCui.dll AcDbMgd.dll AcMgd.dll but I keep getting errors when running it.
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.
Additional information: Could not load file or assembly 'Acmgd, Version=18.2.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
I have tried it with "Copy Local" false (also with true), I have tried to reference the dlls from the ObjectARX directories as well as the AutoCAD installation folders without luck.
Any insight would be apprecaited.
Thank you,
Radek
Solved! Go to Solution.
Re: can't load assembly acmgd.dll
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
How did you try "to interface to AutoCAD from VS2010 project"? Is your VS2010 project a windows class library (*.dll) and you loaded into AutoCAD with "NETLOAD" command, or is it an EXE project?
If it is latter, then you cannot use the said AutoCAD API assemblies iin an exe project.
Re: can't load assembly acmgd.dll
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hmmm
I'm afraid it is an exe. We have a very old custom vb6 application that was able to lunch AutoCad with a specified dwg file, then it was able to capture clicks from the autocad gui capturing data from the clicked object, do some computations and create reports.
We managed to compile it so far so it still somewhat runs with 2012, howerver, we need to migrate it to the VS 2010 C# envrionemnt.
What is the most up to date way to achieve this type of functionality?
Thank you for your help,
Radek
Re: can't load assembly acmgd.dll
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The issue is resolved, thank you for all your input. I was able to interface using COM importing librieries from the common folder.
Re: can't load assembly acmgd.dll
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
How? I'm sorry I could not understand. Please could you explain more detailed?
Re: can't load assembly acmgd.dll
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Obviously, you did not read or understand the posts correctly:
If you are to do a stand-alone EXE project (be it Win Form app or console app), you CAN NOT use AutoCAD .NET API assemblies (acdbmgd.dll, acmgd.dll). End of story.
The OP's solution is to add reference to COM API (in the "Add references" dialog box, go to "COM" tab and then set reference to AutoCAD Type library and/or Acad ObjectDBX Command type library.
In your case (by seeing your attached error picture, you need to remove reference to acdbmsg.dll/acmgd.dll fromo your project.
