Jump to content

Include diesel expression in a lisp file


Manuel_Kunde

Recommended Posts

Hi all,

i have added a diesel printout that gives me the processing time from the drawing statistics.
Can someone help me to include this diesel command in a lisp file? I don't get it at all.

 

I want to show the time to the user via an alert window or something else.

 

$(edtime,$(getvar,tdindwg),$(+,$(*,24,$(fix,$(getvar,tdindwg))),$(edtime,$(getvar,tdindwg),HH)):MM:SS)

 

Link to comment
Share on other sites

I'm sure their is a better way to do this.

(defun C:ETIME (/ time D H M S)
  (setq time (getvar 'tdindwg)
        D (fix time)
        H (fix (setq time (* (- time D) 24)))
        M (fix (setq time (* (- time H) 60)))
        S (rtos (* (- time M) 60) 2 3)
  )
  (alert (strcat "Edit Time: " (itoa D) " Days " (itoa H) " Hours " (itoa M) " Minutes " S " Seconds"))
)

 

Also the Time command displays Total edited time.

  • Like 1
Link to comment
Share on other sites

Example:

(alert (menucmd "M=$(edtime,$(getvar,date),MO/DD/YY)"))

 

Edited by Roy_043
  • Like 2
Link to comment
Share on other sites

40 minutes ago, Roy_043 said:

Example:

(alert (menucmd "M=$(edtime,$(getvar,date),MO/DD/YY)"))

 

 

Yes, thats quick and clean. Thanks.

 

(alert (menucmd "M=$(edtime,$(getvar,tdindwg),HH:MM:SS)"))

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...