Welshman
Computer
- Dec 16, 2002
- 28
I am trying to devise a LISP routine that, when starting a new drawing the routine will look at the system variables "DWGNAME" and "LOGINNAME", collate the two resultant strings together and then write a blank file(zero bytes)with the name of the empty file being the joined "DWGNAME"+"LOGINNAME". The purpose of this is to monitor which drawings were opened, or created, when and by whom.
I will save this LISP routine to the ACADDOC.LSP on each PC.
Below is as far as I have got, but initially I am having two problems.
1. How do I create one STRING for the file name from the "DWGNAME" & "LOGINNAME" chars.
2. What is the best way to write a blank file to a specific directory. i was thinking of useing the old DOS command COPY CON "filename" ctrl Z.
My code so far:
(setvar "cmdecho" 0)
(setq fname ((getvar "dwgname"+(getvar "Loginname"))
(command "copy con" fname)
Please forgive my simplistic routine, still new into this LISP lark.
Any help would be gratefully received.
The WelshMan
I will save this LISP routine to the ACADDOC.LSP on each PC.
Below is as far as I have got, but initially I am having two problems.
1. How do I create one STRING for the file name from the "DWGNAME" & "LOGINNAME" chars.
2. What is the best way to write a blank file to a specific directory. i was thinking of useing the old DOS command COPY CON "filename" ctrl Z.
My code so far:
(setvar "cmdecho" 0)
(setq fname ((getvar "dwgname"+(getvar "Loginname"))
(command "copy con" fname)
Please forgive my simplistic routine, still new into this LISP lark.
Any help would be gratefully received.
The WelshMan