Just a quick rundown:
I am trying to put together a routine that will query GIS data specified in existing query file and then wblock data out using the same name as query file.
My problem arises when the routine returns "bad argument type: stringp nil
and stops at (read-line dir).
Anyone have an idea of where I'm going wrong here?
Code:(defun c:gns () (setvar "filedia" 0) (setvar "cmddia" 0) (setq worms "C:\\temp\\ldd\\") (command "sh" (strcat "dir " worms "*.QRY /b >" worms "Queryfiles.txt") ) (setq dir (open (strcat worms "Queryfiles.txt") "r")) (while (/= (setq filenm (substr (read-line dir) 1 6)) nil) (setq fish (car (list filenm))) (setq net (cons fish net)) (setq handl (reverse net)) ) (foreach ent handl (command "_aderunxquery" ent "") (command ".zoom" "E") (command "-wblock" (strcat "C:\\RAD\\CC_GIS\\CC_Atlas\\" ent) "" "0,0" "ALL" "" ) ) (close dir) (setvar "filedia" 1) (setvar "cmddia" 1) (princ) )