pizarro Posted February 23, 2019 Share Posted February 23, 2019 I need help, any lisp to create and send elements to layers according to color ? Quote Link to comment Share on other sites More sharing options...
ronjonp Posted February 23, 2019 Share Posted February 23, 2019 Here's a quick one: (defun c:foo (/ a b c) ;; RJP » 2019-02-23 (if (setq c (ssget ":L")) (foreach x (vl-remove-if 'listp (mapcar 'cadr (ssnamex c))) (cond ((setq a (cdr (assoc 62 (entget x)))) (setq b (tblobjname "layer" (itoa a))) (entmod (append (entget x) (list (cons 8 (itoa a)) (cons 62 256)))) (or b (entmod (append (entget (tblobjname "layer" (itoa a))) (list (cons 62 a))))) ) ) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
pizarro Posted February 26, 2019 Author Share Posted February 26, 2019 Perfect...¡ Thank you vey much...¡¡ Quote Link to comment Share on other sites More sharing options...
ronjonp Posted February 26, 2019 Share Posted February 26, 2019 51 minutes ago, pizarro said: Perfect...¡ Thank you vey much...¡¡ Glad to help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.