PDA

View Full Version : Time Tracker in real time


akamarathonman
2007-06-27, 09:53 PM
Hi Everyone,
I'm using Acad 2007 with Windows XP
I'm looking for a lisp routine that will track current time on in a
drawing. I know AutoCAD has the "TIME" command, but my boss wants it
to be able to display a running time in the tray with the snap and all
those other toggle switches. If possible he would like to be able to
click on the time displayed in the tray to turn it on or off when you
leave or return.
Has anyone seen anything like this?

I've tried columbus and it wasn't right for what I need. Chronos seemed like it could work, but it's external and my boss wants it to be encorporated into Autocad like I described.

Thanks,

Joe

FRAMEDNLV
2007-06-27, 10:31 PM
Someone posted a link to this one in one of the threads:
http://www.bitcomputing.com

Chris

akamarathonman
2007-06-27, 10:51 PM
Thanks for the reply. I tried it, but that time tracker tracks all programs that are open. I need one that will only track AutoCAD. So far the best one I've found is Chronos. It does a good job, but I need one that is integrated into AutoCAD.

Joe

T.Willey
2007-06-27, 11:03 PM
You might be able to do one in a more powerful language than Lisp, so you might have to hire someone to do it for you.

I think it could be done in .Net, but that is just a guess.

Robert.Hall
2007-06-28, 02:24 PM
It would be nice if there was a timer that stopped the clock after 2 minutes of
not doing anything on the computer. It could also restart once the user starts
to work on the drawing and log itself when the drawing is closed.

I might be asking for too much, but it would be nice to have.

Tom Beauford
2007-06-28, 04:02 PM
I know AutoCAD has the "TIME" command, but my boss wants it to be able to display a running time in the tray with the snap and all
those other toggle switches. If possible he would like to be able to click on the time displayed in the tray to turn it on or off when you leave or return.
Has anyone seen anything like this?
Sure, go to http://www.manusoft.com/Software/Freebies/Index.stm and look for AcadStatButton.zip under Miscellaneous on the left side. Also check out http://archsymb.com//index.php?option=com_content&task=view&id=29&Itemid=52. I played with them a few years back, but Autocad has since added all the switches I need. To get the edit time use the Express Tool EDITTIME with some lisp like: (DEFUN C:EdTime (/ Julian Day DecHr Hr DecMin Min Sec EdTime)
(setq Julian (acet-getvar '("BNS_EDITTIME_TOTAL"))
Day (fix Julian)
DecHr (*(- Julian Day)24)
Hr (fix DecHr)
DecMin (*(- DecHr Hr)60)
Min (fix DecMin)
Sec (rtos(*(- DecMin Min)60)2 0)
EdTime (strcat (rtos Day 2 0) " days, " (rtos Hr 2 0) ":" (rtos Min 2 0) ":" Sec " HHMMSS.")
)
(prompt EdTime)
(princ)
);END EdTime
Should be doable.

Coolmo
2007-07-03, 10:32 PM
Doesn't the command "EDITTIME" do all of this? you can set a timeout limit and turn it on and off whenever you want.

Robert.Hall
2007-07-05, 02:12 PM
Doesn't the command "EDITTIME" do all of this? you can set a timeout limit and turn it on and off whenever you want.

How do you view the time?
I see a bunch of settings for edittime, but I do not see where the
time is kept.

Robert.Hall
2007-07-05, 02:23 PM
Sure, go to http://www.manusoft.com/Software/Freebies/Index.stm and look for AcadStatButton.zip under Miscellaneous on the left side.

If you read through some of the bug fixes, then you might want to stay away
from statbutton. Looks like a few bugs were present that crash autocad.
I have used some of the free downloads from manusoft and have also
experienced undesired behavior in AutoCad.

Tom Beauford
2007-07-05, 02:30 PM
How do you view the time?
I see a bunch of settings for edittime, but I do not see where the
time is kept.It's stored in the enviromental variable "BNS_EDITTIME_TOTAL". The routine I posted above provides one access.
Unfortunatly since "EDITTIME" is an Express Tool and must be turned on to start tracking time it could never be as accurate as management would like. Editing time for blocks and xref's can't be tracked either. This routine will give a rough approximate estimate of editing time which is better than nothing, but not something usefull for billing purposes.

akamarathonman
2007-07-09, 03:59 PM
I know that the TIME command in the standard AutoCAD works too, but it doesn't have the timeout feature. In order to call out the TIME to be put on the taskbar with modemacro I put:

(defun-q S::STARTUP ()
(SETVAR "MODEMACRO" "$(edtime, $(getvar,TDUSRTIMER), HH:MM:SS)")
(PRINC)
)

in the acad2007doc.lsp file. It calls out the variable TDUSRTIMER and puts the current elapsed time in the taskbar. I looked through the help files but I didn't see a variable that I could call out for the express tool EDITTIME.

Does anyone know what variable I could use to call out the elapsed time for the EDITTIME command and have it to be used in a modemacro routine?

Joe

Mike_R
2007-07-09, 08:44 PM
I don't know what variables would be used by the "EDITTIME" express tool, but the "TDINDWG" variable stores the total editing time of the drawing. Or, according to the help file, the "total elapsed time between saves of the current drawing."

Hope that helps.

Tom Beauford
2007-07-10, 10:28 PM
TDINDWG = time between saves of the current drawing.
TDUSRTIMER sores the user-elapsed timer or how long the drawing has been open.

BNS_EDITTIME_TOTAL cannot be accessed by a DIESEL expression. I incorrectly called it an environmental variable eariler.

stephen.coff
2007-07-16, 10:24 AM
This is a very interesting thread.
Whilst this sounds very simple I haven't the skill to do what I am suggesting though I am sure someone out there does.
Couldn't a reactor be set to log the date and time of a drawing into an excel sheet and like wise when the drawing is closed. Upon closing it calculates the difference ?
Though the question is " ?"
Can we tell which file we are actually working on as a trigger ? By this I mean, I often have multiple files open though are usually only working on one and often glancing back to another for refference. We don't want clock ticking over on a file in the back ground only the one open on the screen.

Any suggestions, anyone ?

Stephen

Mike_R
2007-07-16, 04:05 PM
The simplest way to do this (in my opinion) would be a slight modification of akamarathonmans code, something like this... (modification in red)

(defun-q S::STARTUP ()
(SETVAR "MODEMACRO" "$(edtime, $(getvar,TDINDWG), HH:MM:SS)")
(PRINC)
)


All this does is track the total editing time between saves, and places the total time in the left hand side of the status bar, next to the SNAP and GRID buttons. IOW, it tracks the total time the drawing has been open between each actual save of the file. So if you don't save the background drawings you use as reference, then it should be fine.

If you want to get more complex, such as saving to an excel file or the like, that's something I've never done and therefore have no idea how to do it...

stephen.coff
2007-07-17, 01:55 AM
Hey Mike,
That's some good progress. Can I ask a stupid question, being a simple person.
I noticed this Lisp file starts "(defun-q S:" what is the difference from "(defun c:" ?

So the question is can someone out there alter this so it writes to an excel file and updates it , that would be pretty cool.

Stephen

Mike_R
2007-07-17, 02:46 PM
Hey Mike,
That's some good progress. Can I ask a stupid question, being a simple person.
I noticed this Lisp file starts "(defun-q S:" what is the difference from "(defun c:" ?

(defun-q) allows for the function to have other functions appended to it by using the (append) function. (Had to look that up, just ripped it out of akamarathonmans code and didn't notice it there ;)

The s: is just part of the s::startup function. I've often wondered if it has any other purpose myself, but have yet to find it.

Regards,
Mike

stephen.coff
2007-07-17, 02:55 PM
Thanks Mike. There you go, learn something new each day.

Stephen