Backstory
I've been killing myself with trying to get the following (acet-getvar '("BNS_EDITTIME_TOTAL")) in standard time format
rather than julian and then printing it to a file. I never found a way. So I'm figuring the next best thing is to just run the edittime command and then set a custom variable to report the last line of the command history. Then I can open a file and print it to the file. But alas my skills are lacking. Is there an easy way to do this?
If I'm asking the wrong question, what I'm really after is copying the edittime value to a log file. Thanks!
Solved! Go to Solution.
@Anonymous wrote:Backstory
I've been killing myself with trying to get the following (acet-getvar '("BNS_EDITTIME_TOTAL")) in standard time formatrather than julian and then printing it to a file. I never found a way. So I'm figuring the next best thing is to just run the edittime command and then set a custom variable to report the last line of the command history. Then I can open a file and print it to the file. But alas my skills are lacking. Is there an easy way to do this?
If I'm asking the wrong question, what I'm really after is copying the edittime value to a log file. Thanks!
Look into this thread --> LISP to Export TIME Command Results to a Text File <---
I started putting together the following response and attached sample lisp, but in the meantime it looks like pbejse referred you to a good posting. But just in case your interested see below.
-----------------------------------------------------------------------------------------------------------------------------------
Seems as though your first approach may be the way to go, and that you need to use a JULIAN express tool function to convert the Julian Date/Time into a calendar date list which you can then reformat through lisp list manipulation. Apparently you have to execute the JULIAN DATE function to activate the other commands in the JULIAN lisp application.
Other observations:
I put togther the attached LISP program to illustrate some of what I am talking about. I suggest you look at the code, while also viewing the Express Tool help for the EDITTIME and JULIAN tools.
I have not worked with these Express Tools before, much less date time format conversions, but those are my findings.
Thanks for the heads up on (acet-edittime-total). I changed the file I'm writing out to to a csv since I can have excel convert julian time. I was hoping I could write the edittime out to the file, but it doesn't seem to work. Here's what I was trying:
(write-line (strcat "USER:," (getvar 'loginname) "," "EDIT TIME:," (acet-edittime-total) "\n") ofile)
This is only a portion of the code, which was actually from another post which does 99% of what I want but the only issue is that it returns the "TDUSRTIMER" value as the edittime which is less accurate than the edittime value we're discussing. Here's a link to that post fyi:
Thanks for your quick response and for your code. I suspect if I knew more I could probably run it as a subroutine in the lisp and then just write out your line (+ (nth 3 ettotl-cdl) (/ (+ (nth 4 ettotl-cdl) (/ (nth 5 ettotl-cdl) 60)) 60)), but I'm currently at the stage of tweaking some pre-existing codes. I'll take a look at Lee Mac's code and see what I can break there
-Scott
Try the following instead:
(write-line (strcat "USER:," (getvar 'loginname) "," "EDIT TIME:," (rtos (acet-edittime-total) 2 8) "\n") ofile)
Looks like the posting you referenced is similar in nature to the one referenced by pbejse.
Can't find what you're looking for? Ask the community or share your knowledge.