Im in the process of trying to write a routine that will automatically give my files project names. The "projectname" command is what Im trying to implement.
I want to be able to do a lot of file just by running a lisp, selecting a folder that contains the drawing files I want change or add a project name too, prompt for the names I want to use, then it going thru and opening all those files, changing the project names, saving them, and finally closing them. I want to do this all without any user interface other than giving it the name Id like to use and the directory containing the files I want to change. Is this possible? Ive started a simple routine, but its not working. Im not sure if Im going about this the correct way. Someone help please! lol I have a lot of files to do and its becoming very time consuming. Thanks in advance.
This is what I have:
;;;PROJECTNAME.LSP
(defun c:prognm()
(SETVAR "FILEDIA" 0)
(SETVAR "LISPINIT" 0)
(setq run(* 1 1))
(setq pronm(getstring "Enter Project Name: "))
(wHile (= pronm nil)
(setq pronm(getstring "Enter Project Name"))
)
(COMMAND "_SCRIPT" "TST.SCR")
)
(defun-q s::startup()
(COND
(= RUN 1)
(setvar "projectname" pronm)
(command "qsave" "close")
)
)
TST.SCR
FILEDIA
1
_OPEN
?