Can't you access the block definition via ObjectDBX.
(without the dwg file being open)
I am parsing through the blocks to find all the xrefs.
When I get to an XRef... I don't seem to find a way to check if it's an XRef.
I believe I found the answer on another post while researching...
I think this may be the only way is to check if the Block Reference actually has a 'Path property... (see code fragment below) if it does then it is an XRef. If the drawing is open in AutoCAD then there is an IsXref property... but when the drawing is closed this particular propterty is not visible but the 'Path property is.
See also this post:
(and (eq (vla-get-objectname blkobj) "AcDbBlockReference")
(vlax-property-available-p blkobj 'Path)
I started following your posts about ObjectDBX :-)
If you are iterating the BLOCKS collection of the ObjectDBX Document; using the Name property of the Block Reference, then you can use vla-Item on the BLOCKS collection of the ObjectDBX Document to retrieve the block definition object for the block reference and then get the IsXRef property.
I would believe that the IsXRef property is accessible either in the current drawing or in an ObjectDBX Document.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.