Author Topic: How would you handle this: Timer function?  (Read 22264 times)

0 Members and 1 Guest are viewing this topic.

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: How would you handle this: Timer function?
« Reply #45 on: September 15, 2006, 02:25:51 PM »
The program is indifferent to buttons of the mouse and the keyboard...
Certainly, all can be stopped.
I with you agree! (For example a hammer...)

Greg B

  • Seagull
  • Posts: 12417
  • Tell me a Joke!
Re: How would you handle this: Timer function?
« Reply #46 on: September 15, 2006, 02:27:31 PM »
The program is indifferent to buttons of the mouse and the keyboard...
Certainly, all can be stopped.
I with you agree! (For example a hammer...)

Kinda extreme, but yeah that would work.  I was thinking the power button.

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: How would you handle this: Timer function?
« Reply #47 on: September 15, 2006, 02:32:06 PM »
If I have correctly understood, the program is necessary for presentation and should not stop...
I badly understand English and could understand explanations incorrectly.  :-(

Greg B

  • Seagull
  • Posts: 12417
  • Tell me a Joke!
Re: How would you handle this: Timer function?
« Reply #48 on: September 15, 2006, 02:36:28 PM »
No....you did just fine!

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: How would you handle this: Timer function?
« Reply #49 on: September 15, 2006, 02:46:02 PM »
I do not have time to complete this program (command PAN) is not processed, if who that will make, it will be interesting to look!

T.Willey

  • Needs a day job
  • Posts: 5251
Re: How would you handle this: Timer function?
« Reply #50 on: September 15, 2006, 02:47:40 PM »
If I have correctly understood, the program is necessary for presentation and should not stop...
I badly understand English and could understand explanations incorrectly.  :-(
No....you did just fine!
Second!
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

nivuahc

  • Guest
Re: How would you handle this: Timer function?
« Reply #51 on: September 15, 2006, 02:52:24 PM »
I do not have time to complete this program (command PAN) is not processed, if who that will make, it will be interesting to look!

Evgeniy!

The way the routine works right now is more than anyone could ask for. I'm completely blown away by how awesome that is!


JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: How would you handle this: Timer function?
« Reply #52 on: September 17, 2006, 10:55:38 PM »
Yes, That  is very nice Elpanov!

How's the main program going now nivuahc?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: How would you handle this: Timer function?
« Reply #53 on: September 18, 2006, 07:57:17 AM »
During work it is possible to use PAN and ZOOM in a transparent mode.
 :-)

Code: [Select]
(defun time-3dorbit (/ s)
  ;;  ElpanovEvgeniy, Russia, Moscow, 2006
  ;;  Timer for test-3dorbit
  ;; (time-3dorbit)
  (princ "\n tiner set 60 sec ")
  (setq s ((lambda (sec) (+ (* 86400 (- sec (fix sec))) 60)) (getvar "DATE")))
  (while (> s ((lambda (sec) (* 86400 (- sec (fix sec)))) (getvar "DATE")))
    (VL-CATCH-ALL-APPLY (function test-3dorbit) (list s))
  ) ;_  while
  (princ)
) ;_  defun
(defun my-3dorbit (sec / PT1 PT2 R S V V1 VD W)
  ;;  ElpanovEvgeniy, Russia, Moscow, 2006
  ;;  Function "3dorbit"
  ;;  During work it is possible to use PAN and ZOOM
  ;;  in a transparent mode.
  ;;  (my-3dorbit)
  (if (tblsearch "VIEW" "tmp1")
    (setq
      v1  (tblobjname "VIEW" "tmp1")
      pt2 (trans (cadr (grread nil 5)) 1 2)
    ) ;_  setq
    (setq
      v1  (entmakex
            (list
              '(0 . "VIEW")
              '(100 . "AcDbSymbolTableRecord")
              '(100 . "AcDbViewTableRecord")
              '(2 . "tmp1")
              '(70 . 0)
              (cons 40 (getvar "VIEWSIZE"))
              (cons 10 (getvar "VIEWCTR"))
              (cons
                41
                (* (getvar "VIEWSIZE")
                   (apply
                     (function /)
                     (getvar "SCREENSIZE")
                   ) ;_  apply
                ) ;_  *
              ) ;_  cons
              (cons 11 (getvar "VIEWDIR"))
              '(12 0. 0. 0.)
              (cons 42 (getvar "LENSLENGTH"))
              (cons 43 (getvar "FRONTZ"))
              (cons 44 (getvar "BACKZ"))
              (cons 50 (getvar "VIEWTWIST"))
              (cons 71 (getvar "VIEWMODE"))
              '(281 . 6)
              '(72 . 0)
            ) ;_  list
          ) ;_  entmakex
      pt2 (trans (cadr (grread nil 5)) 1 2)
    ) ;_  setq
  ) ;_  if
  (while (and (= (car (setq pt1 (grread nil 5))) 5)
              (> sec ((lambda (sec) (* 86400 (- sec (fix sec)))) (getvar "DATE")))
         ) ;_  and
    (setq r   (/ (getvar "VIEWSIZE") 4.)
          w   (trans (getvar "VIEWCTR") 1 2)
          pt1 (trans (cadr pt1) 1 2)
          v   (trans
                ((lambda (x1 y1 x2 y2)
                   (list
                     (- x1 x2)
                     (- y1 y2)
                     (- (sqrt (abs (- (* R R) (* x1 x1) (* y1 y1))))
                        (sqrt (abs (- (* R R) (* x2 x2) (* y2 y2))))
                     ) ;_  -
                   ) ;_  list
                 ) ;_  lambda
                  (- (car pt2) (car w))
                  (- (cadr pt2) (cadr w))
                  (- (car pt1) (car w))
                  (- (cadr pt1) (cadr w))
                )
                2
                1
              ) ;_  trans
          pt2 pt1
          s   (/ r (distance '(0. 0. 0.) (getvar "VIEWDIR")))
          vd  (mapcar (function (lambda (x) (* x s))) (getvar "VIEWDIR"))
          v   (mapcar (function +) vd v)
          s   (/ r (distance '(0. 0. 0.) v))
          v   ((lambda (s) (list (* (car v) s) (* (cadr v) s) (* (caddr v) s)))
                (/ r (distance '(0. 0. 0.) v))
              )
          w   (* (/ r (getvar "VIEWSIZE"))
                 (* (getvar "VIEWSIZE")
                    (apply
                      (function /)
                      (getvar "SCREENSIZE")
                    ) ;_  apply
                 ) ;_  *
                 4.
              ) ;_  *
    ) ;_  setq
    (entmod
      (list
        (cons -1 v1)
        '(0 . "VIEW")
        '(100 . "AcDbSymbolTableRecord")
        '(100 . "AcDbViewTableRecord")
        '(2 . "tmp1")
        '(70 . 0)
        (cons 40 (getvar "VIEWSIZE"))
        (cons 10 (trans (getvar "VIEWCTR") 1 2))
        (cons
          41
          (* (getvar "VIEWSIZE")
             (apply
               (function /)
               (getvar "SCREENSIZE")
             ) ;_  apply
          ) ;_  *
        ) ;_  cons
        (cons 11 v)
        '(12 0. 0. 0.)
        (cons 42 (getvar "LENSLENGTH"))
        (cons 43 (getvar "FRONTZ"))
        (cons 44 (getvar "BACKZ"))
        (cons 50 (getvar "VIEWTWIST"))
        (cons 71 (getvar "VIEWMODE"))
        '(281 . 6)
        '(72 . 0)
      ) ;_  list
    ) ;_  entmod
    (entupd v1)
    (setview (tblsearch "VIEW" "tmp1"))
  ) ;_  while
) ;_  defun

jxphklibin

  • Guest
Re: How would you handle this: Timer function?
« Reply #54 on: August 19, 2009, 02:21:32 AM »
 Waiting!!!!

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: How would you handle this: Timer function?
« Reply #55 on: August 19, 2009, 05:20:33 AM »
Waiting!!!!


You wish to lift this theme?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: How would you handle this: Timer function?
« Reply #56 on: August 19, 2009, 08:30:35 AM »
LeeBen what are you waiting for exactly?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Shinyhead

  • Guest
Re: How would you handle this: Timer function?
« Reply #57 on: August 19, 2009, 09:26:45 AM »
Not to derail things to much, but wouldn't having an application open and close a series of 3D dwfs be easier and look better? 

jxphklibin

  • Guest
Re: How would you handle this: Timer function?
« Reply #58 on: August 19, 2009, 09:39:17 PM »
LeeBen what are you waiting for exactly?


Posts made the wrong place, sorry!