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

    .NET

    Reply
    Contributor
    sivaulagu
    Posts: 11
    Registered: ‎01-19-2012

    recieving run time error for acmgd.dll

    332 Views, 11 Replies
    01-19-2012 12:44 AM

    "Could not load file or assembly 'acmgd, Version=17.0.54.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

     

    This is the error i recieve, i've already referenced the dll from local installed folder, and made local copy as false. but also i recieve this error... please help me in this i need to proceed with this rectification

    Please use plain text.
    *Expert Elite*
    Posts: 6,457
    Registered: ‎06-29-2007

    Re: recieving run time error for acmgd.dll

    01-19-2012 01:14 AM in reply to: sivaulagu

    Hi,

     

    questions to that:

    • what AutoCAD-version do you drive?
    • when did you receive the error .... when doing _NETLOAD or anywhere else?
    • have you looked into your bin-output-directory if you have no AC*MGD*.dll sitting around? Because if you had set "copy local" to yes before it may have been copied and setting back to "no" the copy may not be removed automatically.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    sivaulagu
    Posts: 11
    Registered: ‎01-19-2012

    Re: recieving run time error for acmgd.dll

    01-19-2012 02:14 AM in reply to: alfred.neswadba

    autocad2007

    wen call this class during run time.. i recieve the error at the calling line...

    i've tried by removing the dll form project directory also

    Please use plain text.
    *Expert Elite*
    Posts: 6,457
    Registered: ‎06-29-2007

    Re: recieving run time error for acmgd.dll

    01-19-2012 02:27 AM in reply to: sivaulagu

    Hi,

     

    >> wen call this class during run time

    And when you load the project manually with _NETLOAD you don't get the error?

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    sivaulagu
    Posts: 11
    Registered: ‎01-19-2012

    Re: recieving run time error for acmgd.dll

    01-19-2012 02:36 AM in reply to: alfred.neswadba

    sorry i dont get wat is _NETLOAD???

    I'm new to this VB.net....

    i've builded the project manually i didnt get any error or warnings...

     

    is this is objectarx concept or vb.net autocad api

    Please use plain text.
    *Expert Elite*
    Posts: 6,457
    Registered: ‎06-29-2007

    Re: recieving run time error for acmgd.dll

    01-19-2012 02:53 AM in reply to: sivaulagu

    Hi

     

    >> i dont get wat is _NETLOAD???

    _NETLOAD is a command built into AutoCAD that lets you load your dotNET-DLL into AutoCAD (so the init is done and defined commands within your DLL are now available for this AutoCAD session).

     

    Not knowing any project structure you use I'll start with the standard case using vb.NET for AutoCAD:

    • you have a DLL-project
    • within this project you have some custom-commands for AutoCAD defined
    • within this project you may have some initialization included
    • you compile the project so you get a DLL-file
    • you start AutoCAD
    • you start command _NETLOAD and point to this DLL-file to get loaded
    • if you have some init-stuff ==> it's now executed
    • the commands you developed are now available within this AutoCAD session.

     

    If you haven't used _NETLOAD ever (and you have not set some registry items to get the DLL loaded automatically) you should start describing how your project works (should work).

    When you don't get your DLL loaded (either by _NETLOAD or by any reg-setting) I can't imagine how do you get it running?

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    sivaulagu
    Posts: 11
    Registered: ‎01-19-2012

    Re: recieving run time error for acmgd.dll

    01-19-2012 03:11 AM in reply to: alfred.neswadba

    i'm creating a seperate windowsapplication with a form and oather stuffs. will be getting inputs from the user to get drawings in autocad.

    for time being i just had a button and in the click event i've called the sub routine from a class containing

     

    Imports Autodesk.AutoCAD.ApplicationServices
    Imports Autodesk.AutoCAD.DatabaseServices
    Imports Autodesk.AutoCAD.EditorInput
    Imports Autodesk.AutoCAD.Geometry

    Public Class Class1

    Public Shared Sub NewClass()
            Dim doc As Document = Application.DocumentManager.MdiActiveDocument
            Dim tAcadDoc As Document = Application.DocumentManager.MdiActiveDocument
            Dim ed As Editor = doc.Editor
            Dim tTrAct As Transaction = Nothing
            Using myTrans As Transaction = tAcadDoc.TransactionManager.StartTransaction
                Dim tBlTab As BlockTable = CType(tTrAct.GetObject(tAcadDoc.Database.BlockTableId, OpenMode.ForRead), BlockTable)
                Dim tModSp As BlockTableRecord = CType(tTrAct.GetObject(tBlTab(BlockTableRecord.ModelSpace), OpenMode.ForRead), BlockTableRecord)
                Dim tModSpCOM As AcadModelSpace = CType(tModSp.AcadObject, AcadModelSpace)
                For Each myObjId As ObjectId In tModSpCOM
                    Dim myEnt As Entity = CType(myObjId.GetObject(OpenMode.ForRead), Entity)
                    Select Case UCase(myEnt.PlotStyleName)
                        Case "ACDBLINE"

                    End Select
                Next
            End Using
        End Sub

    End Class

    Please use plain text.
    *Expert Elite*
    Posts: 6,457
    Registered: ‎06-29-2007

    Re: recieving run time error for acmgd.dll

    01-19-2012 03:27 AM in reply to: sivaulagu

    Hi,

     

    >> i'm creating a seperate windowsapplication

    Do you mean you are creating an EXE?

    If so: You can't use the MGD-library from outside of AutoCAD and so you won't get the managed assemblies loaded.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    sivaulagu
    Posts: 11
    Registered: ‎01-19-2012

    Re: recieving run time error for acmgd.dll

    01-19-2012 03:37 AM in reply to: alfred.neswadba

    so u understand my needs right???

    guide me good book for autocad api,  that gives basic knowledge about this cad api's all those things....

    Please use plain text.
    *Expert Elite*
    Posts: 6,457
    Registered: ‎06-29-2007

    Re: recieving run time error for acmgd.dll

    01-19-2012 03:54 AM in reply to: sivaulagu

    Hi,

     

    >> so u understand my needs right???

    Not sure if I do. ;(

     

    >> guide me good book for autocad api

    Sorry, I have none. But you should be able to search with Google (like >>>this<<<), then you may find some for your language, some in english, you can chose then.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.