Jump to content

Recommended Posts

Posted

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.:unsure: 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.

Posted

I would check its existence and use this:

 

(if (tblsearch "LAYER" "TXT-100")
 (setvar "CLAYER" "TXT-100"))

Posted

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")

 

:)

Posted

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:

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...