Message 1 of 2
Access to xref paths in VBA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to make a list of all xref paths(including nested) in a drawing session in VBA. I can compile an xref name tree through the .isxref property, but I cn't seem to get the .path property, because Thisdrawing.blocks.Item("xrefname") only returns a block, and thisdrawing.modelspace.Item("xrefname") gives a 'invalid procedure call or argument' error. Any suggestions?
Here is some additional info. I have some code that gets all the xrefs in a drawing and check the path to see if the xref drawing exists. If not it checks known alternates(ie the archive) for the drawing. The program also generates a listing of what is found in an alternate location or what isn't found anyplace. This code works, but it is iterating through every object in every xrefed drawing looking for xrefs, which is a problem on drawings with a large number of objects. Through the bocks collection I can quickly get the names of the xrefs, whether they are nested and where they are nested(we're talking microseconds vs tens of minutes on a large drawing), but I cant get the xref that the block object is refering to so I can get the standard xref properties. I think I am missing something basic here. Can anyone offer any suggestions?
Here is some additional info. I have some code that gets all the xrefs in a drawing and check the path to see if the xref drawing exists. If not it checks known alternates(ie the archive) for the drawing. The program also generates a listing of what is found in an alternate location or what isn't found anyplace. This code works, but it is iterating through every object in every xrefed drawing looking for xrefs, which is a problem on drawings with a large number of objects. Through the bocks collection I can quickly get the names of the xrefs, whether they are nested and where they are nested(we're talking microseconds vs tens of minutes on a large drawing), but I cant get the xref that the block object is refering to so I can get the standard xref properties. I think I am missing something basic here. Can anyone offer any suggestions?