Hi all,
I am trying to read the xref tree from a DWG by using an external exe. The app should simply open the DWG and sys-out the referenced paths and whether or not they are nested.
For this, I am using Autodesk.AutoCAD.Interop.
The problem is that I can only get a list of file dependencies (document.FileDependencies) and I can't seem to find an "isNested" value.
Is this even possible?
So far I've got:
AcadDocument document = oAcadApp.Documents.Open("Test.dwg");
foreach (AcadFileDependency o in document.FileDependencies)
{
System.Console.Out.WriteLine(o.FullFileName);
}
There is also the option to get Blocks, but again there is no "isNested" info, only "isXref":
foreach (AcadBlock b in document.Database.Blocks)
{
if (b.IsXRef)
{
...doStuff...
}
}
Any help would be very appreciated 🙂
Sorry for the delay.
There is no COM API equivalent of the "XrefGraphNode" class.
AutoCAD 2013 introduced the accoreconsole.exe which can be invoked from an external exe in the background.
A .Net dll that traverses the Xref graph using the AutoCAD .Net API can be loaded in it to retrieve that information.
You can find more info on using the accoreconsole.exe here :
http://au.autodesk.com/?nd=class&session_id=10454
http://adndevblog.typepad.com/autocad/2012/04/getting-started-with-accoreconsole.html