;;;Change all entities on a layer to another layer (or a new layer). ;;; ;;; ;;; ;;; (DEFUN c:relay (/ sent flst alst ss1 elay rn_layer) (IF rn_elay (SETQ elay rn_elay) (PROGN (SETQ sent (CAR (ENTSEL "\nEntity on source layer: "))) (SETQ elay (CDR (ASSOC 8 (ENTGET sent)))) ) ;_ end of PROGN ) ;_ end of IF (WHILE (PROGN (PRINC (STRCAT "\nChange Entities on Layer " elay " to: ")) (IF rn_layer nil (SETQ rn_layer (STRCASE (GETSTRING (STRCAT "\nDestination layer <" (GETVAR "clayer") ">: " ) ;_ end of STRCAT ) ;_ end of GETSTRING ) ;_ end of STRCASE ) ;_ end of SETQ ) ;_ end of IF (IF (= rn_layer "") (SETQ rn_layer (GETVAR "clayer"))) (SETQ test (TBLSEARCH "layer" rn_layer)) (IF (NULL test) (PROGN (SETQ test (SUBSTR (STRCASE (GETSTRING (STRCAT "\nLayer " rn_layer " does not exist. Create it : " ) ;_ end of STRCAT ) ;_ end of GETSTRING ) ;_ end of STRCASE 1 1 ) ;_ end of SUBSTR ) ;_ end of SETQ (IF (= test "N") (SETQ test nil) (COMMAND ".layer" "n" rn_layer "") ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF (NULL test) ) ;_ end of PROGN ) ;while ; ;================================================================================================== ; Change entities (SETQ flst 'alst) (SETQ alst (CONS (CONS 8 elay) alst)) (SETQ ss1 (SSGET "x" (EVAL flst))) (COMMAND ".chprop" ss1 "" "la" rn_layer "") ; ;================================================================================================== ; Reset the atomlist (PRINC) ) ;_ end of DEFUN ;|«ViLL© FORMAT OPTIONS...» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ***Don't add text below the comment!***|;