nil in lisp routine not working
I have a group lisp routines that needs to just input nil if nothing is found. It doesn't seem to be working. Could someone help me get this to work in Bricscad?
(DEFUN C:SSWD () (SETQ FIL(SSGET "X" (LIST (CONS 8 "DOOR-WINDOW*"))))
(If (Not (= FIL nil))(command "DRAWORDER" FIL "" "BACK")(Setq FIL nil))(princ))