Author Topic: Project naming lisp  (Read 1804 times)

0 Members and 1 Guest are viewing this topic.

PitchBlack98

  • Guest
Project naming lisp
« on: March 09, 2006, 06:17:00 PM »
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:
Code: [Select]
;;;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
?

PitchBlack98

  • Guest
Re: Project naming lisp
« Reply #1 on: March 10, 2006, 11:46:55 AM »
anyone? Maybe a push in the right direction for what I want to do?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Project naming lisp
« Reply #2 on: March 10, 2006, 11:50:26 AM »
I don't use projects, so this just a way to write a script file for you.  You can check out this link.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.