PDA

View Full Version : XREF - orphaned or "Not found"



axa2001ro
2004-06-19, 09:34 AM
Hello!


I have made a module to bind and explode all XREFs from a drawing. If some of XREFs are atached to drawing but the path is wrong I get an error.
In XREF manager, "STATUS" colum can have these values : Loaded, Not found or Orphaned.
I am interested in a way to find which XREF is loaded, orphaned or "Not found".

Thank you!

Ed Jobe
2004-06-21, 02:42 PM
2005 has some new enhancements to the ActiveX api in the area of xrefs, but I havn't had the time to investigate them yet to see if I could change some of my existing code. Here is what I wrote for 2ki. It should still work even though there may or may not be a better way.


Public Function IsXrefResolved(xrBlockName As String) As Boolean
'If the XREf is not resolved (unloaded or not found),
'then attempting to reference the XRefDatabase property
'of the corresponding Block object for the Xref will
'raise an error with the description "No database".
On Error Resume Next
Dim objBlock As AcadDatabase
Set objBlock = ThisDrawing.Blocks(xrBlockName).XRefDatabase
If Err.Number = 0 Then IsXrefResolved = True
End Function