.NET

Reply
*Expert Elite*
Posts: 883
Registered: ‎04-27-2009
Message 11 of 12 (123 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: 608
Registered: ‎03-21-2011
Message 12 of 12 (105 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community