Guest Posted September 29, 2021 Posted September 29, 2021 Hi i am using a code to draw polyline in specific layer name. I want when i do right click or write c for close to end the code the current layer be the 0. I add this lines at the end to the code but is not working !!!! ;change to layer 0 (mapcar 'setvar '(clayer cecolor celtype celweight) (list "0" "BYLAYER" "BYLAYER" -1)) (princ) ) (defun c:test() (command "_layer" "_m" "myPline" "_c" "10" "" "") (setq a (entlast)) (vl-cmdf "_.pline") (while (> (getvar 'cmdactive) 0) (command "\\")) (if (not (equal a (entlast))) (entmod (append (entget (entlast)) (list (cons 8 l) (cons 43 w) (cons 62 c)))) ) ;change to layer 0 (mapcar 'setvar '(clayer cecolor celtype celweight) (list "0" "BYLAYER" "BYLAYER" -1)) (princ) ) Any ideas? Thanks Quote
David Bethel Posted September 29, 2021 Posted September 29, 2021 (edited) You might try : Edited September 29, 2021 by David Bethel Quote
David Bethel Posted September 29, 2021 Posted September 29, 2021 ("clayer" "cecolor" "celtype" " celweight") 1 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.