L_Ruts Posted October 27, 2008 Posted October 27, 2008 I am looking for a way to redefine a mass selection of different blocks to a specified layer and color. They are drawings from another company, so I don't want to explode or take the time to redefine all the blocks to a new layer and color ( most are set to "0" and "white") I've merged layers down to my new layer, but I can't merge 0 to the new layer. Some blocks do have blocks nested inside of them. I don't know if anyone has a LISP that would help. Thanks Quote
Lee Mac Posted October 27, 2008 Posted October 27, 2008 This is a slight alteration of the LISP from my last thread - see if it works for you The layers in the drawing are listed in the "laylist" at the top of the program - you may need to modify this to suit your drawing layer template. Also, I have set the Layer Colour to "by layer" - this can be changed if need be. ; bloclay, created by Lee McDonnell October 2008 (defun c:bloclay (/ laylist ss) (setvar "cmdecho" 0) (setq laylist '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") ) ; end setq (foreach n laylist (if (setq ss (ssget "X" (list (cons 0 "INSERT") (cons 410 (getvar "ctab")) (cons 8 n) ) ; end list ) ; end ssget ) ; end setq (progn (princ "\nType Layer to be moved to: ") (command "_.chprop" ss "" "LA" pause "C" "bylayer" "" ) ; end property change ) ; end progn ) ; end if ) ; end foreach (setvar "cmdecho" 1) (prompt "\nFunction Complete.") (princ) ) ; end program Hope this helps! Quote
Lee Mac Posted October 27, 2008 Posted October 27, 2008 No probs - glad you could make use of it Quote
Recommended Posts
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.