Author Topic: Color bias  (Read 7356 times)

0 Members and 1 Guest are viewing this topic.

rude dog

  • Guest
Color bias
« Reply #15 on: April 19, 2004, 03:20:32 PM »
Code: [Select]

(defun C:CNN ()
(setq ENT (car (entsel "\npick layer color for function ")))
(setq E1 (entget ENT))
(setq LT (cdr (assoc 8 E1)))
(setq ITEM (assoc 62 (tblsearch "Layer" LT)))
;(setq ss (ssget "x" (list (cons 62 ITEM)))
)
(princ)

cannot get this commented out line to make a list of all objects in dwg. that are the same color....gotten good help but dammit still cant get over this fence... :?

SMadsen

  • Guest
Color bias
« Reply #16 on: April 19, 2004, 05:08:57 PM »
(setq ITEM (assoc 62 (tblsearch "Layer" LT)))
^returns a dotted pair

You should extract the color number with CDR:

(setq ITEM (cdr (assoc 62 (tblsearch "Layer" LT))))
(setq ss (ssget "X" (list (cons 62 ITEM))))