Lets analyze this statement Jim
If you need to open a file for "reference" open it as read only.
remind them that everytime a drawing is saved, it will count on editing time.
What you need to do is to add a conditon test on you "diary" routine dont start recording if the file is read only
- (if (eq (vla-get-readonly(vla-get-ActiveDocument (vlax-get-acad-object)) ) :vlax-false ) (princ "\nRecord routine activated...") (princ "\nRecord routine De-activated..."))
Why would you want to save the file if its open for reference. if modification needs to be done on that drawing it will still count as "editing" time,
otherwise why save it at all?
((= thecommandstart "OPEN") (diary))
Believe me, I've been down that road before Jim. programs are only as good as the user could be.
BTW did you look into the link I posted above for edtime function? I strongly suggest re-writing you "diary" routine to account for every possible condtion. I could write one for you but where's the fun in that? , besides who better understand what needs to be done other than you Jim
You can heed my suggestions and start writing the code, if you hit a snag just holler
Cheers |