• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Member
    Posts: 3
    Registered: ‎03-15-2012
    Accepted Solution

    can't load assembly acmgd.dll

    1169 Views, 5 Replies
    03-15-2012 11:39 AM

    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


     

     

    Please use plain text.
    *Expert Elite*
    Posts: 681
    Registered: ‎04-27-2009

    Re: can't load assembly acmgd.dll

    03-15-2012 12:36 PM in reply to: radek

    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.

    Please use plain text.
    Member
    Posts: 3
    Registered: ‎03-15-2012

    Re: can't load assembly acmgd.dll

    03-15-2012 01:55 PM in reply to: norman.yuan

    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

    Please use plain text.
    Member
    Posts: 3
    Registered: ‎03-15-2012

    Re: can't load assembly acmgd.dll

    03-16-2012 08:40 AM in reply to: radek

    The issue is resolved, thank you for all your input. I was able to interface using COM importing librieries from the common folder.

    Please use plain text.
    New Member
    Posts: 1
    Registered: ‎03-19-2012

    Re: can't load assembly acmgd.dll

    03-19-2012 02:08 PM in reply to: radek

    How? I'm sorry I could not understand. Please could you explain more detailed?

    Please use plain text.
    *Expert Elite*
    Posts: 681
    Registered: ‎04-27-2009

    Re: can't load assembly acmgd.dll

    03-19-2012 02:29 PM in reply to: erkanhurnali

    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.

     

    Please use plain text.