<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Delay command in scripts in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/5498390#M144010</link>
    <description>&lt;P&gt;Thanks, unfortunately I hadn't been acquainted with AutoLisp yet, but it worked just fine with the delays&amp;nbsp;after I looked up how to execute it in AutoCad.&amp;nbsp;I then tried using the 'REDRAW command with the script from&amp;nbsp;my original post, but it still placed the delays at the beginning of the script as opposed to between the&amp;nbsp;line/redraw commands. I don't quite understand the differences between the two but the .lsp file worked and .scr didn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help though!&lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2015 21:23:36 GMT</pubDate>
    <dc:creator>david.elgart</dc:creator>
    <dc:date>2015-02-06T21:23:36Z</dc:date>
    <item>
      <title>Using Delay command in scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/5497881#M144008</link>
      <description>&lt;P&gt;Hi, I apologize in advance if this is dumb or obvious&amp;nbsp;since&amp;nbsp;I'm fairly new to using scripts, but&amp;nbsp;I wanted to try out using the DELAY command in between other&amp;nbsp;commands in a script, just to space things out so everyting doesn't pop up at once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a test run I just ran&amp;nbsp;this very simple Notepad&amp;nbsp;script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;line&lt;BR /&gt;0,0&lt;BR /&gt;0,5&lt;BR /&gt;&lt;BR /&gt;Delay 2000&lt;BR /&gt;Line&lt;BR /&gt;0,5&lt;BR /&gt;5,5&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;However, in this case and others I have attempted, always brings the DELAY command into action prior to any other commands, so instead of pausing in between these lines, it is instead pausing at the very beginning of the script. In scripts where I placed multiple delays in between multiple commands, the same occurs, but adding the total delay time to the beginning.&lt;/P&gt;&lt;P&gt;So my question is, is there any way to get the delay to occur in between my commands? Or is it specifically used for slide shows?&lt;/P&gt;&lt;P&gt;(I'm using AutoCAD 2014)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 16:28:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/5497881#M144008</guid>
      <dc:creator>david.elgart</dc:creator>
      <dc:date>2015-02-06T16:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using Delay command in scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/5498250#M144009</link>
      <description>&lt;P&gt;The delay command is intended for use in scripts that display slides. &amp;nbsp;It can be invoked transparently but the effects won't be seen as staged unless you invoke 'redraw or (vla-date (vlax-get-acad-object)) between delayed steps. &amp;nbsp;Here is a sample that works here.&lt;/P&gt;
&lt;PRE&gt;(defun c:test ()
  (setq acd (vlax-get-acad-object))
  (command "line" "0,0")
  (command "'delay" "2000")
  (vla-update acd)
  (command "5,0")
  (vla-update acd)
  (command "'delay" "2000")
  (vla-update acd)
  (command "5,5")
  (vla-update acd)
  (command "'delay" "2000")
  (vla-update acd)
  (command "0,5")
  (vla-update acd)
  (command "'delay" "2000" "cl")
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I'm not sure this is the best approach though. &amp;nbsp;BTW, for an equivalent script file:&lt;/P&gt;
&lt;P&gt;LINE&lt;/P&gt;
&lt;P&gt;0,0&lt;/P&gt;
&lt;P&gt;'DELAY 2000&lt;/P&gt;
&lt;P&gt;'REDRAW&lt;/P&gt;
&lt;P&gt;5,0&lt;/P&gt;
&lt;P&gt;'DELAY 2000&lt;/P&gt;
&lt;P&gt;'REDRAW&lt;/P&gt;
&lt;P&gt;5,5&lt;/P&gt;
&lt;P&gt;'REDRAW&lt;/P&gt;
&lt;P&gt;'DELAY 2000&lt;/P&gt;
&lt;P&gt;ETC&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 19:36:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/5498250#M144009</guid>
      <dc:creator>dbroad</dc:creator>
      <dc:date>2015-02-06T19:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using Delay command in scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/5498390#M144010</link>
      <description>&lt;P&gt;Thanks, unfortunately I hadn't been acquainted with AutoLisp yet, but it worked just fine with the delays&amp;nbsp;after I looked up how to execute it in AutoCad.&amp;nbsp;I then tried using the 'REDRAW command with the script from&amp;nbsp;my original post, but it still placed the delays at the beginning of the script as opposed to between the&amp;nbsp;line/redraw commands. I don't quite understand the differences between the two but the .lsp file worked and .scr didn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help though!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 21:23:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/5498390#M144010</guid>
      <dc:creator>david.elgart</dc:creator>
      <dc:date>2015-02-06T21:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using Delay command in scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/9937572#M144011</link>
      <description>&lt;P&gt;I dig this old thread out while I search for the use of command "delay". I confuse with the input for command "Delay".&lt;/P&gt;&lt;P&gt;Will it be an integer or string?&lt;/P&gt;&lt;P&gt;I don't see explanation in HELP.&lt;/P&gt;&lt;P&gt;I find both seem ok&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(command "delay" 50)
(command "delay" "50")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your helps are much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 06:40:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/9937572#M144011</guid>
      <dc:creator>BeKirra</dc:creator>
      <dc:date>2020-12-14T06:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using Delay command in scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/9938175#M144012</link>
      <description>&lt;P&gt;Either way works in a (command) function, so you may as well save yourself a couple of code characters and omit the quotation marks.&amp;nbsp; In a DELAY command &lt;EM&gt;at the command line&lt;/EM&gt;, it is not accepted with quotation marks.&amp;nbsp; [And it doesn't matter to the answer, but you'll never notice a DELAY of 50 milliseconds.]&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 11:58:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/9938175#M144012</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-12-14T11:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using Delay command in scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/9939995#M144013</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Either way works in a (command) function, so you may as well save yourself a couple of code characters and omit the quotation marks.&amp;nbsp; In a DELAY command &lt;EM&gt;at the command line&lt;/EM&gt;, it is not accepted with quotation marks.&amp;nbsp; [And it doesn't matter to the answer, but you'll never notice a DELAY of 50 milliseconds.]&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Thanks Kent. You are right. It doesn't accept any string when enter input in command line. Here is an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Command: DELAY
Enter delay time (in milliseconds): "500"

Requires an integer between 0 and 32767.
Enter delay time (in milliseconds): 500&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 23:29:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-delay-command-in-scripts/m-p/9939995#M144013</guid>
      <dc:creator>BeKirra</dc:creator>
      <dc:date>2020-12-14T23:29:09Z</dc:date>
    </item>
  </channel>
</rss>

