Jump to content

DELAY command


matrix

Recommended Posts

I write a lot of my own macro's and I just found out about a command called DELAY and I tried it out and it does exactly what it says it does, but what is it good for/when would you be able to use it? The only thing you can do while its DELAYing is zoom around but its slowed down extremely due to the command. I tried reading up on it through help, as well as my ACAD book, but both leave out why you would need it. Thanks,

Link to comment
Share on other sites

Guest Flores

You would use it in a script file to delay the time that slides are shown on the screen. After using "mslide", you can use "vslide" to look at a single slide, but if you have a series of slides for presentation or whatever, you write a script. In "delay" script time, 1000 is equal to 1 second, so if you set the delay for 4000, then it should display the slide for 4 seconds.

 

Quick review:

Use the "mslide" command, and save your view as "Top".

Save another slide called "front".

Save another slide called "left".

 

Copy this script, and save it as "Slideshow.scr"

VSLIDE top
DELAY 1000
VSLIDE front
DELAY 2000
VSLIDE left
DELAY 3000
RSCRIPT

 

Enter "script" at the command line, and watch it work.

Enter different delay times, or put ";" (semicolon) in front of each line that starts with delay, and see how quick it displays the slides, then you will see the need for Delay.

Flores

Link to comment
Share on other sites

Guest Flores

Cadtutor,

I went to the link you provided, and it said:

Create a slide file from the shaded view using the MSLIDE command.
. I am using ACAD 2K, and the mslide doesn't stay shaded when running the script, it looks 2D wireframe. I used the different "shadedge" variables, and even the different "shademode" options in 2k, but still no luck, the slides still look 2d wireframe. I noticed the hyperlink to that tutorial had "acadr14" in it. Does shading slides not work in 2k, or do you do it differently in 2k?

 

Flores

Link to comment
Share on other sites

I think you must be right, I must admit I haven't checked. It used to work in R14, hence the tutorial but the whole SHADE thing was changed in 2000 and since that time I've been using PowerPoint for my presentations anyway.

Link to comment
Share on other sites

  • 11 years later...

edit: After making the following post, I discovered that copying and pasting the script into the command line works well. For some reason the commands are run with a non-uniform time interval if the script is run in a conventional manner. See the third post on page two for further explanation. I believe this to be completely unrelated to the DELAY command.

 

Instead of making a new thread, I thought I would give this one an almighty bump. If that is bad form and I should start a new thread, please let me know.

 

I thought that the DELAY command would give me a simple way to solve my problem, but for some reason it doesn't seem to work as I expect.

For reasons I won't bother going in to, I have written a script that draws simple polygons or lines. I would like to slow this drawing down, so I can see it in 'real time'. (Basically, just a nice visual way to tell the order the lines/polygons are being drawn.)

I thought that I could just add a DELAY between each line so it looks like this:

_LINE 3725.375,2479.06 3725.375,2479.59 
DELAY 5000
_LINE 3725.37,2479.59 3725.37,2479.06 
DELAY 5000
_LINE 3725.01,2479.245 3725.265,2479.54 
DELAY 5000
_LINE 3725.265,2479.54 3725.265,2479.645 
DELAY 5000
_LINE 3725.265,2479.645 3725.22,2479.74 
DELAY 5000
_LINE 3725.005,2479.25 3725.26,2479.545 
DELAY 5000
_LINE 3725.26,2479.545 3725.26,2479.645 
DELAY  5000

This works fine if I have a DELAY of 4000 (4 sec) or greater, but if it is any smaller it becomes jumpy, i.e. some lines appear at the same time so it is not possible to tell the order in which they were drawn.

Any idea why this might be the case? I intended to have a delay of a few hundred msec, so 4 sec is much too long for my purpose.

I thought maybe I had an option like "snap to grid" on that may cause some delay, but as far as I can tell there is not.

(I have checked another computer to be sure it is not my machine slowing things down.)

 

If there's a simpler way of adding this delay between each line, please let me know.

Edited by labmonkey
'Strange solution' found as described on page 2
Link to comment
Share on other sites

Instead of making a new thread, I thought I would give this one an almighty bump. If that is bad form and I should start a new thread, please let me know.

 

 

 

This thread is 11 years old. In the future, please start a new thread when you have a question.

Link to comment
Share on other sites

Sure, will do tomorrow. This thread was on the first page of google when searching "autocad delay", so thought it was worth a go. Not exactly an interesting question that would develop into something interesting for other users, so didn't think it was worth clogging up the forum.

Link to comment
Share on other sites

The original script was written to display a series of slides. A delay of 1000 is equal to one second. You want a few hundred milliseconds? Yeah, I can see where you might encounter a problem.

Edited by ReMark
Link to comment
Share on other sites

No my question is not about slides, but the original post is a broader question than that.

 

My question is, in short, whether there is any limitation to the DELAY command. Not according to any information I can find, however, it doesn't seem to work properly unless the DELAY is 4000 msec or above. That seems strange as the LINE command is very basic and not 'processor intensive' for want of a better phrase. I wonder if it is inherent to the way scripts work or if there is some setting I do not know about that is causing the problem.

Link to comment
Share on other sites

You are attempting to achieve a delay of less than a second yet still see the sequence in which the lines are being drawn? I think that is too fast.

 

I would think that in order to be able to see each line drawn, in sequence, you would want to increase the delay not decrease it.

 

In my own test of drawing seven lines it is almost as though things start to speed up all on their own. I used a delay of 2000.

 

Another test using a slightly different delay (500ms intervals) between lines makes it appear as though the timing is not consistently the same. Odd.

Edited by ReMark
Link to comment
Share on other sites

Yes, that is essentially what I am trying to do.

I suppose another way of looking at it is that I wish to animate my drawing so I can see it grow. Something like a 300ms interval would be best, 1000ms would be ok, but 4000ms is just too slow (for my specific purpose).

 

I found a 'solution' in a bit of surprising way. If I just copy the script and paste it into the AutoCAD command line, it runs completely as expected. Even 100ms looks nice.

 

However, for some reason it does not run smoothly when loaded as a script. I am surprised because I thought, perhaps naively, that scripts are a back door to the command line.

 

My colleague had exactly the same situation on his Apple Mac, so it is not specific to my computer/OS/version.

 

This is a good enough 'solution' for me, however, it is rather peculiar.

 

Thank you to all those that commented. I will edit my original post to update with this 'solution'.

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...