Difference between Block and xRef in AutoLISP

By Augusto Goncalves

After you know the name of the block, For example:

(setq blkname (cdr (assoc 2 (entget (car (entsel))))))

you can pass it into (tblsearch), get the details of the block table record (whether for a normal block or an xref) using:

(tblsearch "BLOCK" blkname)

This returns information from the block table, including the path of the xref (if applicable). The 70 group code differentiates blocks from xrefs, and the 1 group code gives you the path information.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading