Lisp to find out and amend properties of XREF/Block layers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I use the following lisp in order to find out layer names of entities within an xref or block. It works just like the -XLIST command (much better than the standard XLIST command which only shows you the first 40-odd charachters of the layer name without the ability to copy the text out of the output window). However 90% of the time I only want to find the layer name out in order to then change its properties via the layer manager (e.g. change colour from red to black).
Is it possible to amend the lisp so that upon entering the command and picking the entity, it then opens up Layer Manager and has that layer selected (or filtered out) so that I can instantly change its properties and save time finding the layer?
If this isn't possible then I guess a consolation would be to amend the lisp so that the selected layer name is automatically added to the clipboard, with a * before and after the layer name so that I can just paste (CTRL+V) the clipboard into the layer filter within layer manager to get faster access to the layer properties.
(defun C:XRL ()
(setq EnL (entget (car (nentsel "\nSelect object to identify layer it is on : ")))
LNm (cdr (assoc 8 EnL))
)
(princ "\n Entity layer name: ")
(princ LNm)
(prin1))
Thanks in advance