Hi everybody, sorry for my poor english, i can write this better in italian! So, i wold like to change the current color ad layer, draw a mline trugh drawing adn when finishing restore the previous state of layer and colour. I write this code, but i don't know how is it possible to invoke restore routine after mline command. Thanks to all, very fine NG Diego. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;SOC (defun restore() (setvar "cecolor" oldcol) (setvar "clayer" oldlay) ) (defun save() (setq oldcol (getvar "cecolor")) ;; save current color (setq oldlay (getvar "clayer")) ;; save current layer ) (defun C:mpele (/) (save) (setvar "cecolor" "bylayer") (setvar "clayer" "PASSERELLE ELE") (command "mline" "j" "zero") (restore) ) ;;;EOC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;