johnatkinson Posted April 27, 2018 Posted April 27, 2018 hello , i am a complete novice only know some basics i work on drawings with 100's of layers and sometimes 100's of XREF's i would like some help on writing a routine i would like to run a routine called simplelayout and this routine would turn off any layers containing AM_5 for example please please please help me and dont hesitate to ask me questions it is driving me nuts Quote
Roy_043 Posted April 27, 2018 Posted April 27, 2018 The _-Layer command will accept wildcards in layer names. (command "_.-layer" "_off" "*AM_5*" "") Quote
Tharwat Posted April 27, 2018 Posted April 27, 2018 Hi, Or this if you are not a fan of command calls like me. (defun c:Test (/ l n v e) (while (setq l (tblnext "LAYER" (not l))) (and (wcmatch (setq n (cdr (assoc 2 l))) "*AM_5*") (or (minusp (setq v (cdr (assoc 62 (setq e (entget (tblobjname "LAYER" n))))))) (entmod (append e (list (cons 62 (- v))))) ) ) ) (princ) ) Quote
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.