Jump to content

Clean up


flowerrobot

Recommended Posts

Hi all,

Im feed up like many with people not useing layers, so when you come to some ones dwg's to copy,edit,upgrade

it leaves things quite painfull for me at times.

 

So using the filter command im thinking of a list that will place all red lines on the red layer with all settings set to bylayer.

simple, well yer,

but how would i go about doing that with all the blocks in the dwg's, so the stuff in the blocks are set by layer aswell.

but the trick thing is, how would i set some blocks to be left alone?.

eg i dnt want a block called a3 to be touched at all, as its my border, and things like this?

Link to comment
Share on other sites

HI Flowerrobot,

 

This LISP contains something like what you are after - you could alter it to suit your needs.

 

; Txtlay, created by Lee McDonnell October 2008



(defun c:txtlay (/ ss ans)
   
   (setvar "cmdecho" 0)
   (setq laylist '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" 
           "BORDER" "Defpoints" "DIM" "SIGNATURE")
   ) ; end setq

   ; for each Layer in laylist
   (foreach n laylist
       (if 
           (setq ss (ssget "X" 
                   (list 
                       (cons 0 "TEXT")
                       (cons 410 (getvar "ctab"))
                       (cons 8 n)
                   ) ; end list
               ) ; end ssget
           ) ; end setq
           (progn
               (sssetfirst nil ss)
               (initget "Yes No")
               (setq ans (getkword "Change Selected Entities to Text Layer? [Yes/No] <Yes> :" ))
               (if
                   (/= ans "No")
                   (progn
                       (command "_.chprop"
                           ss ""
                           "LA"
                           "TEXT"
                           "C"
                           "bylayer"
                           ""
                       ) ; end property change
                   ) ; end progn
               ) ; end if
           ) ; end progn
       ) ; end if
   ) ; end foreach
   (setvar "cmdecho" 1)
   (prompt "\nFunction Complete.")
   (princ)
) ; end program


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