I have made the insertblock.dll (Class Library Project) file to insert the block in one of my drawing file.
For this, I have to Open the drawing file and using NETLOAD command to load my insertblock.dll and inserting block. It is working fine.
Now I have made the Windows Project (EXE project) and in that I have added my insertblock.dll and executing the EXE file and calling the InsertBlock funtion that inside in insertblock.dll file.
So in this case it is giving the error as shown in the attached Snapshot
Solved! Go to Solution.
You can only reference *mgd*.dll from a plugin. If you want to control autocad from an outside exe you have 2 options: COM interop assemblies or WCF. There are articles on both. I posted one here:
Can you liitle bit ellaborate more so I can easily understand.
Means what chages need to be done in My EXE project to load my insertblock.dll file ?
It means that you CANNOT use managed API DLLs from AutoCAD (acmgd.dll/acdbmgd.dll...) in EXE project. They can only be used in code that runs inside AutoCAD.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.