Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Time reporting lisp logic.

10 REPLIES 10
Reply
Message 1 of 11
MyCADDie
707 Views, 10 Replies

Time reporting lisp logic.

I wonder if anyone has done a time reporting lisp?

What I need - thinking out loud...

 

  • report (to a CSV file) active time totals spent, listed by drawing file in decimal hours per day.
  • do not include increments of less than 15 minutes of inactivity.

Thanks ahead for sharing your thoughts.

10 REPLIES 10
Message 2 of 11
Kent1Cooper
in reply to: MyCADDie


@MyCADDie wrote:

....What I need - thinking out loud...

 

  • report (to a CSV file) active time totals spent, listed by drawing file in decimal hours per day.
  • do not include increments of less than 15 minutes of inactivity.

....


I'm not sure AutoCAD has any way of detecting periods of inactivity.  There's a Timer that the User can turn on or off with the TIME command, but I believe it just runs when it's on, regardless of whether anything's happening.  If someone has multiple drawings open, even though they're not working actively in more than one at a time, the elapsed time is going up in all of them.  I think for such a report to have any meaning, you would need to either require Users to operate under the Single-Drawing Interface [which should result in some serious complaints] or discipline your Users to always remember to turn the Timer off before they move into another drawing and always remember to turn it on in the drawing they move into.

 

[But maybe such things are different in newer versions than mine.]

Kent Cooper, AIA
Message 3 of 11
p_mcknight
in reply to: MyCADDie

I have had such a program on my to do list for a while.  I was figuring on firing a time reset event off of a command reactor that would allow to detect periods of inactivity.  If someone posts something here then great.  Otherwise, maybe it would be a good weekend activity for me.

Message 4 of 11
BlackBox_
in reply to: MyCADDie

You might consider looking into CADTempo.

 

 

 

Disclaimer: This is a shameless plug for a great application, that I have absolutely zero stake in its success or failure.

 

 



"How we think determines what we do, and what we do determines what we get."

Message 5 of 11
PatrickHughes
in reply to: MyCADDie

I am compelled to respond to Black Box because of the ominous post # of his reply.

 

BB666.jpg

 

 

But thank you for the plug. To elaborate on some of the features mentioned in the original post and another reply, CadTempo handles the scenario of several open drawings and records time only of the active drawing. It also has an adjustable timer sensitive to idle time.

Patrick Hughes

Engineered Design Solutions
Developer of CadTempo - Cad Time Tracking
www.cadtempo.com
Message 6 of 11
MyCADDie
in reply to: PatrickHughes

By chance does CADTempo have a plugin that could be loaded via lisp and functions used in that context.

I have used from time to time vlax-import-type-library (see below piece of code) to load and access functionality from lisp. 

 

 

(vlax-import-type-library            ; import the type library           
      :tlb-filename file                  ; the path and file name to the executable   
      :methods-prefix "xlsm-"       ; define method wrappers           
      : properties-prefix "xlsp-"      ; define property wrappers          
      :constants-prefix "xlsc-"       ; define constant wrappers          
     )

Message 7 of 11
BlackBox_
in reply to: PatrickHughes


@PatrickHughes wrote:

I am compelled to respond to Black Box because of the ominous post # of his reply.

 

BB666.jpg

 

 

But thank you for the plug. 


*Tips hat*... Mwwwwaaaattttaaaahhhhaaaahhhaahhhh

 



"How we think determines what we do, and what we do determines what we get."

Message 8 of 11
PatrickHughes
in reply to: MyCADDie

MyCADDIE,

 

There are no plugins as of now but I am always interested in hearing ideas. There are a couple of parameters that can be passed into the logger at start and/or to a running instance. As an example it can display the current amount of time in real time, or prompt for a task name, etc. So if you wanted to assign a button to shell out the logger you can.

 

Contact me via PM or email.

Patrick Hughes

Engineered Design Solutions
Developer of CadTempo - Cad Time Tracking
www.cadtempo.com
Message 9 of 11
gccdaemon
in reply to: PatrickHughes

What about a routine that logs command entry with a time stamp? Then you could just browse through and see the inactivity.

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
Message 10 of 11
3wood
in reply to: gccdaemon

If there is a command still active in the drawing but the user is away from current section, it is still recorded as one command instead of a break in the log.

 

Message 11 of 11
trevor.bird.au
in reply to: MyCADDie

Hi MyCADDie,

 

The AutoCAD ExpressTools provides an arx app called edittime.arx which provides the following LISP functions:
(acet-edittime-enable [onOff])   Sets current state if onOff supplied. Returns current state.
(acet-edittime-reset)                  Resets elapsed time value to zero.
(acet-edittime-total)                  Returns current elapsed time total (Julian time).
(acet-edittime-timeout [value])  Sets current timeout value if supplied (Julian time). Returns current timeut value.

 

The ExpressTools help explains the use of EDITTIME.

 

I've been using it for drawing time logging and based on my understanding of it's functionality I have set the inactivity timeout to 1 minute which should give a more accurate value of active time in a drawing:

  (acet-edittime-timeout (/ 60.0 86400.0))

 

Time values are a fraction of a 24 hour day.

 

I use a DWG reactor (vlr-dwg-reactor) so I can turn off time logging when the drawing is closed and to reset time logging if the drawing is "saved as" to a new drawing name.

 

I don't use the data EDITTIME stores in the Named Object Dictionary of the drawing but write the data returned by (acet-edittime-total) to a log file.

I convert the result of (acet-edittime-total) to minutes before writing it to the log file along with the date and time opened and the drawing name (complete with path).

 

 

Regards,

Trevor

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost