"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
Hi,
questions to that:
- alfred -
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
Hi,
>> wen call this class during run time
And when you load the project manually with _NETLOAD you don't get the error?
- alfred -
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
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:
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 -
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
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 -
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....
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 -
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. 🙂
Can't find what you're looking for? Ask the community or share your knowledge.