How to stop a stop watch

Discussion in 'AutoCAD' started by Adesu, Mar 22, 2005.

  1. Adesu

    Adesu Guest

    How to stop a stop watch , if the user set with "00:09:45",end display would
    as user input,thanks for your revised.

    ; sw is stand for stop watch
    ; Design by Ade Suharna <.>
    ; 22 March 2005
    ; Program no.217/03/2005
    ; Edit by
    (defun s1 (l1 hei item cnt)
    (command "_text" "_non" l1 hei "" item)
    )
    (defun s2 (l2 hei item cnt)
    (command "_text" "_non" l2 hei "" item)
    )
    (defun s3 (l3 hei item cnt)
    (command "_text" "_non" l3 hei "" item)
    )
    (defun s4 (l4 hei item cnt)
    (command "_text" "_non" l4 hei "" item)
    )
    (defun s5 (l5 hei item cnt)
    (command "_text" "_non" l5 hei "" item)
    )
    (defun s6 (l6 hei item cnt)
    (command "_text" "_non" l6 hei "" item)
    )
    (defun c:sw (/ hei l1 lis cnt)
    (command "_erase" (ssget "x") "")
    (setq hei 2)
    (setq l1 (list 9.6440 0.0 0.0))
    (setq lis '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9"))
    (setq cnt 0)
    (foreach item lis
    (s1 l1 hei item cnt)
    (setq cnt (1+ cnt))
    (command "_erase" "l" "")
    )
    (command "_text" "_non" l1 hei "0" (nth 0 lis) "")
    (setq l2 (list 7.9834 0.0 0.0))
    (foreach item lis
    (s2 l2 hei item cnt)
    (setq cnt (1+ cnt))
    (command "_erase" "l" "")
    )
    (command "_text" "_non" l2 hei "0" (nth 0 lis) "")
    (setq c1 (list 7.3269 0.0 0.0))
    (command "_text" "_non" c1 hei "0" ":" "")
    (setq l3 (list 5.663 0.0 0.0))
    (foreach item lis
    (s3 l3 hei item cnt)
    (setq cnt (1+ cnt))
    (command "_erase" "l" "")
    )
    (command "_text" "_non" l3 hei "0" (nth 0 lis) "")
    (setq l4 (list 4.0057 0.0 0.0))
    (foreach item lis
    (s4 l4 hei item cnt)
    (setq cnt (1+ cnt))
    (command "_erase" "l" "")
    )
    (command "_text" "_non" l4 hei "0" (nth 0 lis) "")
    (setq c2 (list 3.3491 0.0 0.0))
    (command "_text" "_non" c2 hei "0" ":" "")
    (setq l5 (list 1.6885 0.0 0.0))
    (foreach item lis
    (s5 l5 hei item cnt)
    (setq cnt (1+ cnt))
    (command "_erase" "l" "")
    )
    (command "_text" "_non" l5 hei "0" (nth 0 lis) "")
    (setq l6 (list 0.0 0.0 0.0))
    (foreach item lis
    (s6 l6 hei item cnt)
    (setq cnt (1+ cnt))
    (command "_erase" "l" "")
    )
    (command "_text" "_non" l6 hei "0" (nth 0 lis) "")
    (princ)
    )
     
    Adesu, Mar 22, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.