SstennizZ Posted September 30, 2008 Share Posted September 30, 2008 I made the following lisp, but for some reason the layer doesn't change to the specified layer, but stays in the current. What am I overlooking? (defun c:5 (/) (setq clyr (getvar "clayer")) ;store current layer (setvar "cmdecho" 0) (command "_.layer" "set" "Looproute" nil) (setvar "cecolor" "bylayer") (command "mline" "J" "Z" "S" "500") (setvar "clayer" clyr) (princ) ) Quote Link to comment Share on other sites More sharing options...
neekcotrack Posted September 30, 2008 Share Posted September 30, 2008 I would try to make the layer instead of setting because if its not there it will error out. It will be easier in the long run. Quote Link to comment Share on other sites More sharing options...
lpseifert Posted September 30, 2008 Share Posted September 30, 2008 Try putting this after (command "mline" "J" "Z" "S" "500").... not tested (while (= 1 (getvar "cmdactive")) (command pause) );while Quote Link to comment Share on other sites More sharing options...
SstennizZ Posted September 30, 2008 Author Share Posted September 30, 2008 I would try to make the layer instead of setting because if its not there it will error out. It will be easier in the long run. Thats not quite the issue since we always work from the same template. And I'll try that lpseifert. Quote Link to comment Share on other sites More sharing options...
SstennizZ Posted September 30, 2008 Author Share Posted September 30, 2008 Briliant! That works just fine! 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.