Using NENTSEL I can get it to work picking one object at a time but I want it to loop to do the entire drawing at once.
- Code: Select all
(defun C:QQQ ( / esl laycol )
(while (not (setq esl (nentsel)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq LayCol (cdr (cadddr (tblsearch "layer" ( cdr(assoc 8 (entget (car esl)))))) ))
(setq LayLin (Cdr (cadr (cdddr (tblsearch "layer" ( cdr(assoc 8 (entget (car esl)))))) )) )
(setq LayName (strcat (rtos LayCol) LayLin))
(COMMAND "LAYER" "m" LayName "C" laycol LayName "Ltype" LayLin LayName "")
(COMMAND "CHPROP" esl "" "LA" LayName "C" "BYLAYER" "LType" "BYLAYER" "")
)
