This is lisp programme to make selected object 's layer as current layer.
i used 1st cadr function (in place of CDR). it results some error. And then i used CDR . it works fine. can u tell me what is excat function of this two function. i supposed that cadr will be work well. please explain it
(DEFUN C:ES()
(SETQ A(CAR(ENTSEL "\Select Entity To current Layer..")))
(setq b(cdr (assoc 8(entget a))))
(command "-layer" "s" b ""))