I am trying to write a lisp that allows me to pick and object, the layer is extracted from the object and, then use ssget with the layer extracted as a filter for selection. What am I dong wrong?
(defun c:ron2 (/ ent entity)
(setq ent (cdr (assoc 8 (entget (car (entsel "\nSelect object to set layer: "))))))
(setq entity (ssget '((8 . ent))))
)
Thanks,
Ron