jennielowery 发表于 2022-7-5 22:39:40

AutoLisp that tracks time - qu

while searching for a way to more efficiently track my job times on AutoCAD .. I came across an autolisp that someone wrote for someone else who asked for it.It was back from 2010.The thread degraded after a while and no more responses.
 
 
I got the lisp to work, but I'm having trouble deciphering the results properly, and was hoping someone could help.
 
 
I'm from the US, so when dates/times are displayed the way we normally see them .. it always throws me for a loop lol.
 
 
Help?
 
 
Here is the response from the lisp
 
DATE: 30.07.14 16.25.21
DRAWING: G:\LongTermCareRX\Elder Care\Royston, GA\Eldercare - Royston, GA (LTC) V.7 07-30-14.dwg
CREATED: 13.05.14 12.25.18
TOTAL EDITING TIME: 09.32.06
 
 
I'm trying to figure out what the total elapsed edit time is .. I know I opened the drawing at 4:23pm and finished the edit (a test edit not a real edit mind you) and closed/saved the drawing at 4:25pm .. so .. lol .. is that 9 seconds and a bunch of change?
 
 
Just not familiar with this time format.
 
 
TIA,
Jennie

Snownut 发表于 2022-7-5 23:03:38

I can help you with the time part, the TOTAL EDITING TIME is just that, total time since the drawing was created, has nothing to do with the current editing session.Becomes even a bigger issue when you start a drawing by copying another, takes time from original drawing.

7o7 发表于 2022-7-5 23:09:48

Try this routine.

(defun c:test() (defun tmp(l / a l1)   (setq a '(("1" "January") ("2" "February") ("3" "March") ("4" "April") ("5" "May") ("6" "June")      ("7" "July") ("8" "August") ("9" "September") ("10" "October") ("11" "November") ("12" "December"))l1 (mapcar 'vl-princ-to-string l))   (cond ((= (length l1) 6) (strcat (cadr (assoc (nth 1 l1) a)) " " (nth 2 l1) " "(nth 0 l1) " - " (nth 3 l1) "h " (nth 4 l1) "m " (nth 5 l1)))((= (length l1) 3) (strcat (nth 0 l1) "h " (nth 1 l1) "m " (nth 2 l1)))(t "")) )(load "julian") (princ (strcat "\nDate/Time of first save : " (tmp (jtoc (getvar 'TDCREATE))))) (princ (strcat "\nDate/Time of last save : " (tmp (jtoc (getvar 'TDUPDATE))))) (princ (strcat "\nTotal time of Editing : " (tmp (cdddr (jtoc (getvar 'TDUSRTIMER)))))) (princ))

MSasu 发表于 2022-7-5 23:30:50

There is also the TIME built-in command.

jennielowery 发表于 2022-7-5 23:42:07

 
 
 
Yes, that was also a suggestion in the thread I got the lisp from .. only problem is .. I have to remember to activate it each time I open a drawing .. and sometimes I open so many a day (while answering the phone and various other tasks not computer related) that sometimes I simply forget .. I need something that I can insert into my acad1014doc.lsp so it starts each time I open a drawing .. lazy I know .. but I need all the help I can get lol .. my memory is awful and my desk covered in sticky notes! haha
 
 
 
 
thank you!I was afraid that's what was happening but without the OP to ask, I was just guessing .. although the poster claimed it tracked each time you worked on it (and thus produces a log in folder the DWG is housed).This will still work, I will just have to check the log before I start working on old drawings.
 
 
 
What does this lisp do exactly?
页: [1]
查看完整版本: AutoLisp that tracks time - qu