|
I hope this file will help you.
; Makes sure that all dimensions, text, center lines, hidden lines ; and phantom lines are of the correct color and on the correct layer. ; Modify defaults to suit.
(defun C:FL (/ OLAY SS1 SS2 SS3 SS4 SS5) (setvar "CMDECHO" 0) (setq OLAY (getvar "CLAYER")) (command "layer" "m" "dime" "lt" "continuous" "" "c" "yellow" "" "") (command "layer" "m" "text" "lt" "continuous" "" "c" "green" "" "") (command "layer" "m" "center" "lt" "center" "" "c" "red" "" "") (command "layer" "m" "hidden" "lt" "hidden" "" "c" "green" "" "") (command "layer" "m" "phantom" "lt" "phantom" "" "c" "white" "" "") (prompt "\nChecking Dimensions...") (setq SS1 (ssget "X" '((0 . "DIMENSION")))) (if SS1 (command "change" SS1 "" "p" "c" "bylayer" "la" "dime" "lt" "bylayer" "") ) (prompt "\nChecking Text...") (setq SS2 (ssget "X" '((0 . "TEXT")))) (if SS2 (command "change" SS2 "" "p" "c" "bylayer" "la" "text" "lt" "bylayer" "") ) (prompt "\nChecking Center Elements...") (setq SS3 (ssget "X" '((6 . "CENTER")))) (if SS3 (command "change" SS3 "" "p" "c" "bylayer" "la" "center" "") ) (prompt "\nChecking Hidden Elements...") (setq SS4 (ssget "X" '((6 . "HIDDEN")))) (if SS4 (command "change" SS4 "" "p" "c" "bylayer" "la" "hidden" "") ) (prompt "\nChecking Phantom Elements...") (setq SS5 (ssget "X" '((6 . "PHANTOM")))) (if SS5 (command "change" SS5 "" "p" "c" "bylayer" "la" "phantom" "") ) (command "layer" "s" OLAY "") (princ) ); end fl.lsp
------------- Ing Arben.Allaraj
http://cad-drafting-corner.blogspot.com
|