Code Red > AutoLISP (Vanilla / Visual)

Unloaded/Unresolved xRefs

(1/4) > >>

cmwade77:
Ok, I will probably end up having to roll my own, but in the interest of not reinventing the wheel, does anyone have a routine that automatically detaches any xrefs that are either unloaded, unresolved or not found?

We find that we are getting more and more drawings with almost circular xRefs that have some unloaded and to try to get rid of those is complicated.

MSTG007:
lol.... please let me know if you find something. that is all to common here.

ronjonp:
Perhaps this: https://www.theswamp.org/index.php?topic=4103.0

MP:
Pretty easy. If an xref is unloaded the xref block def’s count property will be zero, if it can’t be resolved (eg path nfg) the count will be 1. Before performing the detach method delete all instances (cdrs of 331 groups in the xref block def’s DXF data) of the xref (the previously will find multiples as well as nested) lest the detach method fail. Cheers.

roy_043:
Regarding unloaded/unresolved:
Since a resolved xref may contain a single object, relying on the count property is risky.

BTW: In BricsCAD there are some dedicated functions for this purpose:
vla-get-isresolved
vla-get-isunloaded

Navigation

[0] Message Index

[#] Next page

Go to full version