;;Power-CLic freeware/shareware : ;;HTTP://WWW.POWER-CLIC.COM ;; BLOC_0 BLARG0 (if pw-foreign (progn (Prompt "\nAll drawing's block redefinition (c) G-EAUX 2001 ") (prompt "\nBloc_o to put all entiies on 0 layer") (prompt "\nblarg0 to make all entities with bylayer width") (prompt "\nbcoul0 to make all entities with byblock color") ) (progn (Prompt "\nredéfinition automatique des blocs (c) G-EAUX 2001 ") (prompt "\nBloc_o pour que les entités soit sur le calque 0") (prompt "\nblarg0 pour largeur ducalque") (prompt "\nbcoul0 pour couleur dubloc") ) ) ; **************************************************************************** ;;§/blocs/definit tous les bloc fait de calque 0/none ;;define all block made with layer zero entities ; (defun c:bloc_0 ( / ent prem to_0 ) (defun to_0 ( / tmp eg) (while ent (setq eg (entget ent)) (if (not (equal (setq tmp (assoc 8 eg)) '(8 . "0"))) (progn (setq eg (subst '(8 . "0") tmp eg)) (entmod eg) (entupd ent) ) ) (setq ent (entnext ent)) ) ) (setq prem (tblnext "block" 't)) (setq ent (cdr ( assoc -2 prem ))) (to_0) (while (setq ent (tblnext "block" )) (setq ent (cdr ( assoc -2 ent ))) (to_0) ) (command "._regen") ) ; **************************************************************************** ;;§/blocs/definit tous les bloc fait de ligne de largeur dubloc/none ;;define all block made of byblock weight entities ; (defun c:blarg0 ( / ent first to_l0 ) (defun to_l0 ( / tmp eg ) (while ent (setq eg (entget ent)) (if (print (setq tmp (assoc 370 eg))) (progn (print (setq eg (subst '(370 . -1) tmp eg))) (entmod eg) ;(print eg) (entupd ent) ) ) (setq ent (entnext ent)) ) ) (setq first (tblnext "block" 't)) (setq ent (cdr ( assoc -2 first ))) (to_l0) (while (setq ent (tblnext "block" )) (setq ent (cdr ( assoc -2 ent ))) (to_l0) ) (command "._regen") ) ; **************************************************************************** ;;§/blocs/definit tous les bloc fait de ligne de couleur dubloc/none ;;define all block made of byblock color entities ; (defun c:bcoul0 ( / ent 1st to_c0 ) (defun to_c0 ( / tmp eg ) (while ent (setq eg (entget ent)) (if (print (setq tmp (assoc 62 eg))) (progn (print (setq eg (subst '(62 . 0) tmp eg))) (entmod eg) ;(print eg) (entupd ent) ) ) (setq ent (entnext ent)) ) ) (setq 1st (tblnext "block" 't)) (setq ent (cdr ( assoc -2 1st ))) (to_c0) (while (setq ent (tblnext "block" )) (setq ent (cdr ( assoc -2 ent ))) (to_c0) ) (command "._regen") )