[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Find Layer Names
Tip# 3078 By Lloyd Velasquez On 24-Dec-2008
3
Rated By 1 users
Categories : Tips & Tools Weekly Archive Tips
Software type : AutoCAD
Rename File To : No Files to download.
With this AutoLISP code, you type IDLAYR and select an object, then the layer name appears in the Command line.

Lloyd Velasquez says, "I often work with DWGs that have hundreds of xrefs. With this AutoLISP code, you type IDLAYR and select an object, then the layer name appears in the Command line."

(defun c:idlayr (/ LAY PIK STR)
  (command "layer" "S" 0 "" )
  (setq pik (nentsel " Select a nested layer to id"))
  (setq lay (assoc 8 (entget (car pik))))
  (setq str (cdr lay))
  (print str)
  (princ)
)

NOTES FROM CADALYST TIP PATROL:
This tip works well. It should run just as well without the first line that changes to layer 0 (zero).

 

 

Average Rating:
3


User comments


Log In