Jump to content

Recommended Posts

Posted

Hi i am using a code to draw polyline in specific layer name. I want when i  do right click or write c for close to end the code  the current layer be the 0.

 

I add this lines at the end to the code but is not working  !!!!

 

;change to layer 0
(mapcar 'setvar '(clayer cecolor celtype celweight) (list "0" "BYLAYER" "BYLAYER" -1)) 
(princ)
)

 

 

(defun c:test()
(command "_layer" "_m" "myPline" "_c" "10" "" "")
(setq a (entlast))
  (vl-cmdf "_.pline")
  (while (> (getvar 'cmdactive) 0) (command "\\"))
  (if (not (equal a (entlast)))
    (entmod (append (entget (entlast)) (list (cons 8 l) (cons 43 w) (cons 62 c))))
  )
;change to layer 0
(mapcar 'setvar '(clayer cecolor celtype celweight) (list "0" "BYLAYER" "BYLAYER" -1)) 
(princ)
)

 

 

Any ideas?  Thanks

Posted (edited)

You might try :

Edited by David Bethel
Posted

("clayer" "cecolor" "celtype" " celweight")

  • Like 1

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