.NET

Reply
Contributor
sivaulagu
Posts: 11
Registered: ‎01-19-2012
Message 1 of 12 (511 Views)

recieving run time error for acmgd.dll

511 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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,401
Registered: ‎06-29-2007
Message 2 of 12 (503 Views)

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
-------------------------------------------------------------------------
Contributor
sivaulagu
Posts: 11
Registered: ‎01-19-2012
Message 3 of 12 (498 Views)

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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,401
Registered: ‎06-29-2007
Message 4 of 12 (496 Views)

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
-------------------------------------------------------------------------
Contributor
sivaulagu
Posts: 11
Registered: ‎01-19-2012
Message 5 of 12 (495 Views)

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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,401
Registered: ‎06-29-2007
Message 6 of 12 (487 Views)

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
-------------------------------------------------------------------------
Contributor
sivaulagu
Posts: 11
Registered: ‎01-19-2012
Message 7 of 12 (483 Views)

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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,401
Registered: ‎06-29-2007
Message 8 of 12 (481 Views)

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
-------------------------------------------------------------------------
Contributor
sivaulagu
Posts: 11
Registered: ‎01-19-2012
Message 9 of 12 (479 Views)

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

*Expert Elite*
Alfred.NESWADBA
Posts: 9,401
Registered: ‎06-29-2007
Message 10 of 12 (473 Views)

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
-------------------------------------------------------------------------
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!