delay

Discussion in 'AutoCAD' started by mark, May 20, 2004.

  1. mark

    mark Guest

    hello all,

    is there a delay ex. (command "delay" 5000)
    as a vla functionn (vla-delay ... (vla-wait ???
    or any function without having to use command

    TIA
     
    mark, May 20, 2004
    #1
  2. mark

    ECCAD Guest

    (vla-cmdf "DELAY" 1000)

    ..according to the good book.

    Bob
     
    ECCAD, May 20, 2004
    #2
  3. mark

    mark Guest

    thanks, but that is the same as a command,
    i will give it a try...actually i was looking
    for the one suggested by TT (i think),
    which compared elapsed times, i am not
    able to locate the sample code on my
    system or as a search in this newsgroup.
    thanks again
    mark
     
    mark, May 20, 2004
    #3
  4. mark

    Joe Burke Guest

    Mark,

    I don't know who the author is, maybe Tony.

    ;argument: Seconds expressed as real (0.1) or integer
    (defun wait (seconds / stop)
    (setq stop (+ (getvar "DATE")
    (/ seconds 86400.0)))
    (while (> stop (getvar "DATE"))(princ))
    ) ;end

    Joe Burke
     
    Joe Burke, May 21, 2004
    #4
  5. mark

    mark Guest

    thanks, that is what i was looking for

     
    mark, May 21, 2004
    #5
  6. mark

    Joe Burke Guest

    That argument line may be confusing.

    example:
    (wait 0.5)

    Joe Burke
     
    Joe Burke, May 21, 2004
    #6
  7. mark

    Steve Doman Guest

    Hi Joe,

    I have that same exact function in my toolbox and recall that it was
    posted by Tony. So I assume he wrote it.

    The problem with the Delay command is that it doesn't work good for very
    short delays. The wait user function works well.

    Sometimes I find coding situations where using something like this fine
    tunes the delay better:

    (repeat 500 (princ))

    However, as our computers become faster, I find I must increase the
    number of repeats to maintain the same effect. i.e. Pentium 1 machine
    repeat 100 times, Pentium 4 machine repeat 500.

    End of blab...

    Regards,
    Steve Doman


     
    Steve Doman, May 21, 2004
    #7
  8. mark

    Joe Burke Guest

    Hi Steve,

    I thought wait was Tony's, but I don't have an author noted. Agreed, I never had much
    luck with delay. I guess the other method you mentioned proves what Intel advertises
    as faster really is, though sometimes I wonder.

    Aside while you are reading here. I was doing some research on vectors this evening.
    Ran across a discussion between you and Jon Fleming from 1998 regarding a program you
    were working on called "split". It was intended to offset a line both ways in 3D
    space. Jon posted fairly complex solution which I haven't studied yet. The next to
    last Google message listed in that thread was from you saying thanks to Jon and, "now
    it's my turn to reflect on this code..."

    So I'm wondering how it turned out. For instance, did Jon's code do the trick?

    Joe Burke
     
    Joe Burke, May 21, 2004
    #8
  9. mark

    Steve Doman Guest

    Joe,

    Just a quick note because I've got to get back to work. Jon's code
    worked very well. If your interested, I posted split[20] on my really
    cool website:

    http://www.users.qwest.net/~sdoman/

    I use Split frequently, but haven't looked at the code for a couple
    years. I should update it to todays standards. Jon the "Transformer",
    really helped me out. (thanks Jon if your watching)

    Regards,
    Steve Doman
     
    Steve Doman, May 21, 2004
    #9
  10. mark

    Joe Burke Guest

    Thanks, Steve. A working example will be a great help.

    Way cool website, indeed. ;-)

    Joe
     
    Joe Burke, May 22, 2004
    #10
  11. mark

    Steve Doman Guest

    Note the liberal use of white space :)
     
    Steve Doman, May 22, 2004
    #11
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.