Wow.....information overload!
- OK...so let's tackle one thing here at a time. I took your lisp, and tried it but nothing actually got written to the txt file?
Code:
(vlr-set-notification (vlr-lisp-reactor nil '((:vlr-lispwillstart .
lispwillstart))) 'active-document-only)
(defun lispWillStart (a b / file lis CommandName)
(setq
V1 (menucmd "M=$(edtime, $(getvar,date),DDDD)")
TM (menucmd "M=$(edtime, $(getvar,date),hh:mm:ss)")
MO (menucmd "M=$(edtime, $(getvar,date),MOnth)")
DAY (menucmd "M=$(edtime, $(getvar,date),DD)")
YR (menucmd "M=$(edtime, $(getvar,date),yyyy)")
DATE (strcat V1 ", " MO " " DAY ", " YR " " TM)
LGN (getvar "loginname")
VERS (getvar "acadver")
LIN1 (strcat (car b) " " LGN " " DATE " " VERS)
CommandName (substr (car b) 2 (1- (if (vl-string-search " " (car b))
(vl-string-search " " (car b))
(vl-string-search ")" (car b))
)
)
)
CommandName (strcase CommandName)
)
(if (and
(findfile "C:/Lisp-Count.txt")
(member CommandName (list "EXP" "LYR" "PROBE" "LYRUP" "SPR"))
)
(progn
(setq file (open "C:/Lisp-Count.txt" "a"))
(write-line LIN1 file)
(close file)
)
)
)
- The *Lispcommands* aren't used anywhere else in the lisp, so I removed them.
- Not sure what you were asking here?........
;;Can these be made local variables? Or are there other routines that
;;rely on these variables to be set by this one?
- Regarding the code for the versions, not sure how to get those to read better in the txt file. Can you offer additional help on this?
15.0 = 2000
15.1 = 2000i
15.6 = 2002
After version 15.x, they become more predictable.
16.0 = 2004
16.1 = 2005
16.2 = 2006
17.0 = 2007
17.1 = 2008
17.2 = 2009
18.0 = 2010
- Last question........When creating a post here in Augi, how do you break out the code into it's on box?
Moderator's Note:
OK.....so the big issue right now is that it's not even logging the lisps to the txt file when I use them in a session of CAD. We can build from there.......thanks a bunch for the help!!