Jump to content

Recommended Posts

Posted

Hi guys... I have been learning LISP (slowly) and am having a little trouble. I have been trying to write a routine for turning architects drawings into backgrounds. I have a particular set of drawings with the same layers in each that I want to run this on. I seem to have gotten it to make changes to everything but when it comes down to specific layers, I am a bit lost.

 

I have changed all layers to color 55, but I also want to change 2 particular layers to color 126. I also want to delete the objects on 3 particular layers as well.

 

Here is what I currently have to address the layer color change:

 

 (while (setq d (tblnext "LAYER" (null d)))
   (if
     (or
       (minusp (cdr (assoc 62 d)))
       (= 1 (logand 1 (cdr (assoc 70 d))))
     )
     (setq e (cons (cdr (assoc 2 d)) e))
   )
 )
 (command "_.-laydel")
 (foreach x e (command "_N" x))
 (command "" "_Y" "_.-layer" "_C" "55" "*" "")

 

Any help would be greatly appreciated.

 

Thanks!

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