awill81 Posted April 8, 2009 Posted April 8, 2009 I'm working on a startup lisp for when I open a dwg. So far I've just got a few command like audit in it. I'm wanting to have the current layer set to TXT-100 when it's opened. But I don't know how it is written in lisp. I always like to see what autocad process is when it does something before I write a script, but I found that the command line doesn't return anything when you change what your current layer is. Any feedback would be appreciated. Quote
Lee Mac Posted April 8, 2009 Posted April 8, 2009 I would check its existence and use this: (if (tblsearch "LAYER" "TXT-100") (setvar "CLAYER" "TXT-100")) Quote
russell84 Posted April 9, 2009 Posted April 9, 2009 Put this in your opening lisp code - adjust to suit (if(not (tblsearch "LAYER" "TXT-100")) (command "-layer" "new" "TXT-100" "Color" 7 "TXT-100" "LTYPE" "Continuous" "TXT-100" ""));end if (setvar "CLAYER" "TXT-100") Quote
awill81 Posted April 9, 2009 Author Posted April 9, 2009 Thanks for the info on this! Now I won't end up plotting on the 0 layer and get a blank sheet of paper! lol:lol: 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.