This should get you started:
Code:((lambda (i / ss e c) (setq ss (ssget)) (while (setq e (ssname ss (setq i (1+ i)))) (cond ((= 1 (setq c (cdr (assoc 62 (entget e))))) ;; <- Code for red objects ) ((= 2 c) ;; <- Code for yellow objects ) ((= 3 c) ;; <- Code for green objects ) ((= 4 c) ;; <- Code for cyan objects ) ;; <- Additional colors here )) (princ)) -1)



Reply With Quote


Bookmarks