Retrieving detailed XRef info with VBA

Retrieving detailed XRef info with VBA

Anonymous
Not applicable
1,077 Views
3 Replies
Message 1 of 4

Retrieving detailed XRef info with VBA

Anonymous
Not applicable
I'm trying to retieve information about Xrefs (source filename, loading success etc.) contained within a drawing using AutoCAD 2000's VBA.

I've done this in the past by "parsing" Xref log files with a bit of string manipulation, but this is cumbersome and inefficient. The IsXref property on AcadBlock objects allows me to weed out the Xref entities in a drawing, but I haven't been able to gather any more information other than the Xref's assigned name.

Does the AutoCAD 2002 object library expose any extra Xref-specific properties?

Thanks in advance for any ideas.
0 Likes
1,078 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
You could iterate the space blocks until you encounter an object whose
objectname property returns "AcDbExternalReference" then assign it to
an AcadExternalReference variable. However, the AcadExternalReference
object doesn't offer much more than a path property.

To get around this limitation, you can either use VisualLISP (see
GetXrefPath and GetXrefType in the VB section of my site) or the
BlockEx class in vbXtender.arx (Downloads section). With vbXtender,
you can retrieve an xref's path and status (resolved, unresolved,
etc.) directly from the block object.

Good luck.

--
"That's no ordinary rabbit."
http://www.acadx.com


"DavidEagle" wrote in message
news:f0766a9.-1@WebX.maYIadrTaRb...
I'm trying to retieve information about Xrefs (source filename,
loading success etc.) contained within a drawing using AutoCAD 2000's
VBA.
I've done this in the past by "parsing" Xref log files with a bit of
string manipulation, but this is cumbersome and inefficient. The
IsXref property on AcadBlock objects allows me to weed out the Xref
entities in a drawing, but I haven't been able to gather any more
information other than the Xref's assigned name.
Does the AutoCAD 2002 object library expose any extra Xref-specific
properties?
Thanks in advance for any ideas.
0 Likes
Message 3 of 4

Anonymous
Not applicable
I am interested in anything anyone else has to say about this, with an
additional request for how to find out which, if any, xrefs might be nested
into others, even under the circumstances of none of them being resolved,
either because of a loading problem or that the files have been renamed or
moved. Thanks.

"Frank Oquendo" wrote in message
news:3C65EB20F0342DD9583D6AE587701FB7@in.WebX.maYIadrTaRb...
> You could iterate the space blocks until you encounter an object whose
> objectname property returns "AcDbExternalReference" then assign it to
> an AcadExternalReference variable. However, the AcadExternalReference
> object doesn't offer much more than a path property.
>
> To get around this limitation, you can either use VisualLISP (see
> GetXrefPath and GetXrefType in the VB section of my site) or the
> BlockEx class in vbXtender.arx (Downloads section). With vbXtender,
> you can retrieve an xref's path and status (resolved, unresolved,
> etc.) directly from the block object.
>
> Good luck.
>
> --
> "That's no ordinary rabbit."
> http://www.acadx.com
>
>
> "DavidEagle" wrote in message
> news:f0766a9.-1@WebX.maYIadrTaRb...
> I'm trying to retieve information about Xrefs (source filename,
> loading success etc.) contained within a drawing using AutoCAD 2000's
> VBA.
> I've done this in the past by "parsing" Xref log files with a bit of
> string manipulation, but this is cumbersome and inefficient. The
> IsXref property on AcadBlock objects allows me to weed out the Xref
> entities in a drawing, but I haven't been able to gather any more
> information other than the Xref's assigned name.
> Does the AutoCAD 2002 object library expose any extra Xref-specific
> properties?
> Thanks in advance for any ideas.
>
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
> how to find out which, if any, xrefs might be nested

One way is to use the XrefDatabase property and iterate through each
xref's Block collection.

--
"That's no ordinary rabbit."
http://www.acadx.com


"John Vogt" wrote in message
news:AE028B2503FF8F58E06BBB2F42D3381F@in.WebX.maYIadrTaRb...
> I am interested in anything anyone else has to say about this, with
an
> additional request for how to find out which, if any, xrefs might be
nested
> into others, even under the circumstances of none of them being
resolved,
> either because of a loading problem or that the files have been
renamed or
> moved. Thanks.
0 Likes