Test for an XRef

Does anyone know if you can Test (via Lisp) in a drawing to see if it has an
Xref or not?
I've a program I wrote which opens selected DWG files... I clean them up, etc.
What I want to do is IF the drawing has an Xref (ie a Border in Paperspace),
to set TileMode to 1... if no Xref... leave it as Model Space.
But I can't see how to do this... any thought?
Regards,
Bruce
Reply to
Mr. B
Loading thread data ...
Step with (tblnext "BLOCK" T) and (tblnext "BLOCK") through the block table an check the value of dxf code 70: if it is >=4 it is some kind of xref.
Reply to
bob.at
More correctly, you should do a bitwise evaluation of code 70. If the "4" bit is set, the block is an XRef:
(if (= (logand (cdr (assoc 70 dat)) 4) 4) (alert "This is an XREF") (alert "This is a normal Block") )
Code 70 may be greater than 4, even though the 4 bit is not set; individual bit values currently in use go as high as 64. See the Customization Guide section of HELP. ___
Reply to
Paul Turvill
Thank you Bob...
Bruce
Reply to
Mr. B
Thanks for the correction!
Bruce
Reply to
Mr. B

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.