.NET

.NET

Reply
*Expert Elite*
norman.yuan
Posts: 1,064
Registered: ‎04-27-2009
Message 11 of 12 (164 Views)

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
Balaji_Ram
Posts: 749
Registered: ‎03-21-2011
Message 12 of 12 (146 Views)

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 :

http://adndevblog.typepad.com/autocad/2012/04/getting-started-with-accoreconsole.html

 

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

 

<<<<<

-xref

?

*

>>>>



Balaji
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.