Display full version of the post: command filter

teo18480
19.02.2008, 09:58
HELLO guys,i want to ask something.i am making a lisp file and i would like to know if there is another way to write the command filter.when i am typing the command a window appears.is there any other way to type it and have something at my command line.here is an example:if i type at command line the command layer ---->a window appear if i type -layer--->i have results at the command line.does anyone know how i can do this with the command filter?thanx

Arben.Allaraj
19.02.2008, 12:07
 
 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

teo18480
19.02.2008, 18:41
thanx for your reply.i really dont need something like this but i found it very good.do u know if there is a lisp that i can search my drawing for dimensions and then to erase them?i need something like this.filter the dimensions----->erase the dimensions.thanx a lot

Arben.Allaraj
20.02.2008, 11:46
 
 Search to CADALYST WEB.