乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 85|回复: 4

[编程交流] AutoLisp that tracks time - qu

[复制链接]

1

主题

2

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 22:39:40 | 显示全部楼层 |阅读模式
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
回复

使用道具 举报

4

主题

194

帖子

192

银币

初来乍到

Rank: 1

铜币
25
发表于 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

0

主题

93

帖子

93

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-5 23:09:48 | 显示全部楼层
Try this routine.
  1. (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))
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-5 23:30:50 | 显示全部楼层
There is also the TIME built-in command.
回复

使用道具 举报

1

主题

2

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 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?
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-11 06:13 , Processed in 0.478373 second(s), 62 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表