+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Jul 2012
    Posts
    7

    Default time function - time interval

    Registered forum members do not see this ad.

    I want to move a donut along a 2dpolyline, this is what i have now, maybe somebody will show me a better way.

    Code:
    (defun c:an ( / ss en edxf p1 pas i data0 data pin pf )
      (setq ss (ssget "_:S" '((0 . "*LINE"))))   
        (setq 
    	  en	(ssname ss 0)
    	  edxf	(entget en)
    	  p1	(cdr (assoc 10 edxf))
        ) ;_ end of setq
      (setq pas 1)
      (setq i 0)
      (COMMAND "donut" 0.001 10 p1 "")
      (setq data0 (strcase (menucmd "M=$(edtime,$(getvar,date),SS)")))
      (while (<
    	   (setq data (atof(strcase (menucmd "M=$(edtime,$(getvar,date),SS)"))))
    	   (+ (atof data0) 8))
        (setq data (atof(strcase (menucmd "M=$(edtime,$(getvar,date),SS)"))))
        (progn
          (setq pin (vlax-curve-getPointAtDist en (* i pas)))
          (setq pf (vlax-curve-getPointAtDist en (* (+ 1 i) pas)))
          (command "move" (entlast) "" pin pf)
          (setq i (1+ i))
          )
      )
      (princ)
      )

  2. #2
    Forum Deity BlackBox's Avatar
    Using
    Civil 3D 2011
    Join Date
    Nov 2009
    Posts
    3,932

    Default

    Registered forum members do not see this ad.

    Welcome to CADTutor!

    Consider this simple example:
    Code:
    (setq LoopUntiltime (+ 8000 (getvar 'millisecs)))
    (while (< LoopUntiltime (getvar 'millisecs))
      ;; <- do something for 8 seconds
      )
    Last edited by BlackBox; 11th Jul 2012 at 08:50 pm.
    "Potential has a shelf life." - Margaret Atwood

Similar Threads

  1. Mouse Pointer Disappear from time to time
    By nicolas in forum AutoCAD Beginners' Area
    Replies: 3
    Last Post: 10th Aug 2011, 04:37 pm
  2. Mind Bending Time with Time FX for the iPhone and iPad
    By Between the Lines in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 11th Feb 2011, 05:30 pm
  3. NEED HELP BIG TIME!
    By blazerspeed in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 6th Feb 2006, 01:59 pm
  4. my first time
    By perrymeison in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 15th Jun 2005, 10:54 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts