masterfal Posted April 5 Posted April 5 Hi All, I have this little lisp routine i run for creating revision clouds. I have it set up so i can turn any closed polyline object into my preset cloud layer with correct arc lengths etc. After its run it always changes my current layer to the one specified in the code below (rev 000 all) and i'd rather it not do that. I know the code is 'setting' the layer first, not sure how to amend so i can switch back to previous layer. Or if keeping current layer isn't easy, switching to layer '0' at the end would also be handy.. Any help greatly appreciated! (defun c:rc () (command "-LAYER" "S" "rev 000 all" "tr" "50" "" "" "revcloud" "A" "700" "700" "o" pause "")) Quote
Jonathan Handojo Posted April 5 Posted April 5 Use a variable to store your current layer first. Get it using getvar and setvar: (defun c:rc ( / ly) (setq ly (getvar "clayer")) (command "-LAYER" "S" "rev 000 all" "tr" "50" "" "" "revcloud" "A" "700" "700" "o" pause "") (setvar "clayer" ly) (princ) ) 1 Quote
masterfal Posted April 5 Author Posted April 5 thats absolutely perfect.. i love this place. you guys are so unbelievably helpful. cadtutor community ftw!! 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.