.NET

Reply
Valued Contributor
dhimant.bhensdadia
Posts: 57
Registered: ‎04-18-2013
Message 1 of 5 (284 Views)
Accepted Solution

Reg. Could Not Load Acdbmgd.dll

284 Views, 4 Replies
10-31-2013 04:02 AM

Hi,

 

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

 

 

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.

Valued Contributor
sszabo
Posts: 86
Registered: ‎09-05-2012
Message 2 of 5 (270 Views)

Re: Reg. Could Not Load Acdbmgd.dll

10-31-2013 05:31 AM in reply to: dhimant.bhensdadia

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:

 

http://forums.autodesk.com/t5/NET/Catastrophic-failure-HRESULT-0x8000FFFF-E-UNEXPECTED/m-p/3765575#M...

Valued Contributor
dhimant.bhensdadia
Posts: 57
Registered: ‎04-18-2013
Message 3 of 5 (264 Views)

Re: Reg. Could Not Load Acdbmgd.dll

10-31-2013 05:56 AM in reply to: dhimant.bhensdadia

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 ?

*Expert Elite*
norman.yuan
Posts: 1,001
Registered: ‎04-27-2009
Message 4 of 5 (255 Views)

Re: Reg. Could Not Load Acdbmgd.dll

10-31-2013 06:18 AM in reply to: dhimant.bhensdadia

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.

Valued Contributor
dhimant.bhensdadia
Posts: 57
Registered: ‎04-18-2013
Message 5 of 5 (250 Views)

Re: Reg. Could Not Load Acdbmgd.dll

10-31-2013 06:21 AM in reply to: norman.yuan
OK...Thanks....
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.