Author Topic: Can't find unresolved xrefs in XrefGraph  (Read 1538 times)

0 Members and 1 Guest are viewing this topic.

Nightcrawler

  • Mosquito
  • Posts: 7
Can't find unresolved xrefs in XrefGraph
« on: November 19, 2019, 10:16:18 AM »
Hi!

I'm trying to list all xrefs in a model. My experiments so far is looking good, but there is just one thing that doesn't seem to work. I don't get unreferenced xrefs (delete all instances of an xref) when I use the Database.GetHostDwgXrefGraph method:

Code: [Select]
XrefGraph xrg = db.GetHostDwgXrefGraph(true);

for (int i = 1; i < xrg.NumNodes; i++)
{
    XrefGraphNode xrgn = xrg.GetXrefNode(i);
    Debug.WriteLine($"{xrgn.Name}, {xrgn.XrefStatus.ToString()}");
}

Am I missing something or why can't I see unreferenced xrefs using this method?

Thanks!