uhmmnn... [begin ramblings]
what about
on drawing open
-> get drawing path, title
-> get current user, date, time
-> get TDINDWG value
-->> store above info in USERxx or dictionary or whatever[/list:u]user does their stuff here
when exiting drawing
-> get current time
-> get TDINDWG value again
-> calculate difference in time
-> calculate difference in TDINDWG
-->> write Drawing path, title, date, time spent in dwg, Current User and difference in TDINDWG to text file[/list:u]That will give you the Drawing Title, The user, date, the length of time the drawing was open and the amount of time actually spent editing the drawing (
big difference !).
You don't need to worry about multiple drawings being opened as the info is only written out on file close (no temp files). You just need to work out the best way to catch all the ways you can exit a drawing and redefine the commands or whatever.
Capturing the amount of time the drawing was open and the amount of time actually editing the drawing could tell you a lot. You can have a drawing open all day but only work on it for a few minutes.
It's my understanding that TDINDWG is only active when the dwg is the active window so if the dwg is open but someone is working on Excel then TDINDWG does not update until the dwg is active again. (I may well be wrong
) but it's the closest thing you will get to actual editing time.
I would try to stay away from having temp files open all over the place. You can get
ALL the information you need when the drawing is being closed so why not just write the info out at that point ?
I'm not entirely sure I agree about the spying bit but using the above "method", you could set it up so that it writes all the info to one file or writes a different log file for each user.
One warning though. I would be hesitant about taking the values you will get at face value.
ex. I might have a drawing open all day. I might only work
in the drawing for 2 hours but I may have used Excel for another hour doing calculations for that drawing. I may also open another couple of dwg's to sketch in but not save them ~ just copy my sketches into my main dwg (the one being logged). So, my log would show that I had the drawing open for 8 hours while my editing time was only 2 hours but my actual working time for that drawing would be closer to 4 or 5 hours.
Whatever values you get at the end of the day will be skewed to a certain extent, so you may have to apply a fuzz factor and that may be down to how much you trust each user.
[/begin rambling]