*Expert Elite*
1,084 Posts
215 Kudos
Registered: ‎04-27-2009
Post 11 of 12

Re: Listing all xrefs attached to a group of (unopened) drawings

11-19-2012 06:52 AM in reply to: mona.akkoush

acadmgd.dll/acmgd.dll can ONLY be used with managed DLL loaded INTO running AutoCAD session/process. So, you must run AutoCAD and netload your managed DLL int to AutoCAD, if your dll references acadmgd.dll/acmgd.dll. After NETLOAD your dll into AutoCAD, it is possible to access drawing information without open it in AutoCAD editor.


If your goal is to create a standalone app, then NO, you cannot use acdbmmd.dll/acmgd.dll. Your best bet would be use AutoCAD COM API. If you do not mind to make thing extra complicated, you could use AutoCAD managed .NET API (i.e. use acdbmgd/acmgd.dll) and expose it as COM. You still need to load the managed DLL into AutoCAD, though), but the extra effort may not be worth it.


In any case (COM, or .NET API as COM from external standalone app), you MUST have AutoCAD running for your task, unless you cough a lot of money for RealDwg license. Since you need AutoCAD running anyway, for your task, building a standalone app is hardly a good choice.

ADN Support Specialist
761 Posts
100 Kudos
Registered: ‎03-21-2011
Post 12 of 12

Re: Listing all xrefs attached to a group of (unopened) drawings

11-22-2012 02:41 AM in reply to: mona.akkoush

Hello Mona,


If you are using AutoCAD 2013, you have one more option. You can use the accoreconsole.exe in addition to the COM API as Norman suggested.


A script file that runs the command line version of the xref command can be used. The accoreconsole.exe can be driven by an external application. You can find an example of accoreconsole being invoked from an external application here :



The script file to print all the existing xrefs can have this :







Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post