recieving run time error for acmgd.dll

recieving run time error for acmgd.dll

sivaulagu
Contributor Contributor
3,196 Views
11 Replies
Message 1 of 12

recieving run time error for acmgd.dll

sivaulagu
Contributor
Contributor

"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

0 Likes
3,197 Views
11 Replies
Replies (11)
Message 2 of 12

Alfred.NESWADBA
Consultant
Consultant

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
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 12

sivaulagu
Contributor
Contributor

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

0 Likes
Message 4 of 12

Alfred.NESWADBA
Consultant
Consultant

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
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 5 of 12

sivaulagu
Contributor
Contributor

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

0 Likes
Message 6 of 12

Alfred.NESWADBA
Consultant
Consultant

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
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 7 of 12

sivaulagu
Contributor
Contributor

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

0 Likes
Message 8 of 12

Alfred.NESWADBA
Consultant
Consultant

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
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 9 of 12

sivaulagu
Contributor
Contributor

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

0 Likes
Message 10 of 12

Alfred.NESWADBA
Consultant
Consultant

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
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 11 of 12

sivaulagu
Contributor
Contributor

anyway thanks yaar.... thank u verymuch

0 Likes
Message 12 of 12

dgorsman
Consultant
Consultant

You have two options for building managed .NET "stuff" for AutoCAD.  The first is to create an EXE, or stand-alone application.  This sends instructions to a running session of AutoCAD.  Since you have one application telling another what to do, this is slow and has some limitations so is considered "second best".  The second method is to create a DLL that is loaded into a running session of AutoCAD, either through a call to the NETLOAD command or loaded on demand using a registry switch.  This is the preferred method, since it is being run by AutoCAD (instead of the other way around) it is faster and has more options of getting things done.

 

I suggest getting started using one of the various "Getting Started" guides available online.  Try plugging "getting started with AutoCAD .net" into a search engine. 🙂

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes