Jump to content

Mline lisp


SstennizZ

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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