how to get dwg path of xref in xref? (like xlist)

how to get dwg path of xref in xref? (like xlist)

jan_tappenbeck
Collaborator Collaborator
910 Views
2 Replies
Message 1 of 3

how to get dwg path of xref in xref? (like xlist)

jan_tappenbeck
Collaborator
Collaborator

hi !

i have a xref with include several other xref.

now we search a way to pick one of the "Sub"-xref like the express-function XLIST.

 

but we want to get the complete path of the "Sub"-xref.

 

i did not have any idea of the way to get the result.

 

could someone script the way?

 

regards Jan

 

regards Jan

0 Likes
911 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

 

An XREF (eXternal REFerence) is an external CAD file, image, or PDF that is linked to your current drawing.  AutoCAD loads the file into the current drawing and displays it, and even notifies you if a referenced file has been modified, and prompts you to reload the reference.  You can think of XREFs as blocks from another drawing. 

0 Likes
Message 3 of 3

zrobert
Advocate
Advocate

Hi;

 

You have current drawing database. BlockTable of current drawing database contain BlockTableRecords.
If you iterate this block table records, and for each of them, check property blkTblRec.IsFromExternalReference,
you can detect all xref in your drawing. For all of this xref BlockTableRecords, you can use property blkTblRec.PathName,
to get path of this xref, and you can use function blkTblRec.GetXrefDatabase(), and get Database of this xref.
Now, you can get BlockTable, and BlockTableRecords of this new database, and repeat all proccess. This will help you to detect
all xrefs in all xrefs.

This is a partial answer to your problem, but it may help.

0 Likes