<?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: Displaying program progress on screen not a progressbar in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508366#M74825</link>
    <description>I dunno.  Does the TRACE entity avoid the blinking screen issue?&lt;BR /&gt;Do traces have a width property?  An LWPOLYLINE does.</description>
    <pubDate>Mon, 11 May 2020 23:59:49 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2020-05-11T23:59:49Z</dc:date>
    <item>
      <title>Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9505284#M74817</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am writing a small game for AutoCAD in vb.net and would like to see the progress after each loop in the program. I tried committing the transaction with&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; regen for &lt;/SPAN&gt;each loop and showing and hiding the main form but it only shows the final product. If I put a getstring in the loop it shows the progress up to that point but I don't want the user to have to keep hitting enter to see the progress. I wrote it in autolisp as well and that shows the progress with each step but its way too slow. Any suggestions would be welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 18:15:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9505284#M74817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-10T18:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9505310#M74818</link>
      <description>Is this a .NET question (program progress) or a Lisp question (speed it up)? If it's the former, it's in the wrong Forum; if the latter, we can't help without seeing the code.</description>
      <pubDate>Sun, 10 May 2020 18:37:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9505310#M74818</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-05-10T18:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9505794#M74819</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I wrote it in autolisp as well and that shows the progress with each step but its way too slow. Any suggestions would be welcome.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What approach did you use to show an on-screen&amp;nbsp; progress bar with lisp?&amp;nbsp; Do you mind posting your code so we could effectively give you better suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 04:39:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9505794#M74819</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2020-05-11T04:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9505847#M74820</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;Good morning.&amp;nbsp;&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;I guess the OP indicates to acets functions. eg: acet-ui-progress-init,safe,done.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 05:46:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9505847#M74820</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2020-05-11T05:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9506128#M74821</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/660967"&gt;@_Tharwat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT size="4"&gt;Good morning.&amp;nbsp;&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;I guess the OP indicates to acets functions. eg: acet-ui-progress-init,safe,done.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are probably right, I keep forgetting there are tons of&amp;nbsp; acet functions out there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, back then,&amp;nbsp; i've taken the&amp;nbsp;fill_image route with DCL to create a progress bar. Thats why i'm interested what the OP's approach was, could be something new.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 09:03:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9506128#M74821</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2020-05-11T09:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508156#M74822</link>
      <description>&lt;P&gt;I was thinking about using a 2D solid and stretching it out horizontally over time...&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun @progressbar (p10 height width / p11 p12 p13 w t1 t2 ent)
  (graphscr)
  (setq p12 (mapcar '+ p10 (list 0 height 0)))
  (setq w (* width 0.1))
  (setq p11 (mapcar '+ p10 (list w 0 0))
        p13 (mapcar '+ p12 (list w 0 0))
  )
  (vl-cmdf "_.solid" "_non" p10 "_non" p11 "_non" p12 "_non" p13 "")
  (setq ent (entget (entlast)))
  (setq t1 (getvar "date"))
  (setq t2 t1)
  (while (&amp;lt; w width)
    (while (&amp;lt; (- (setq t2 (getvar "date")) t1) 1e-6))
    (setq w (+ w 1))
    (setq p11 (mapcar '+ p10 (list w 0 0))
          p13 (mapcar '+ p12 (list w 0 0))
    )
    (setq ent (subst (cons 11 p11)(assoc 11 ent) ent))
    (setq ent (subst (cons 13 p13)(assoc 13 ent) ent))
    (entmod ent)
    (setq t1 t2)
  )
)&lt;/LI-CODE&gt;
&lt;P&gt;Well that didn't work too well.&amp;nbsp; A white screen just kept blinking at me until it ended, but at least the solid had grown.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 22:02:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508156#M74822</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-05-11T22:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508157#M74823</link>
      <description>&lt;P&gt;DOSLIB has a progressbar function.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 22:04:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508157#M74823</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-05-11T22:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508296#M74824</link>
      <description>&lt;P&gt;How about finding a use for the long forgotten Trace instead of a solid. You can still draw them using the ".trace" command.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 23:09:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508296#M74824</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-05-11T23:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508366#M74825</link>
      <description>I dunno.  Does the TRACE entity avoid the blinking screen issue?&lt;BR /&gt;Do traces have a width property?  An LWPOLYLINE does.</description>
      <pubDate>Mon, 11 May 2020 23:59:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9508366#M74825</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-05-11T23:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9511895#M74826</link>
      <description>&lt;P&gt;Maybe&amp;nbsp; a (princ asq) the asq is the extended character of a filled sq.&amp;nbsp; will go across command line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(Repeat 25
(princ (chr 149))
(command "delay" 200)
(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 06:13:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9511895#M74826</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-05-13T06:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9512919#M74827</link>
      <description>I think I have it figured, just nothing written yet... grdraw.&lt;BR /&gt;I'l try to get a rudimentary one working for testing purposes.  Then will&lt;BR /&gt;have to adjust for pixel size and viewtwist.  My LABEL_IT program uses&lt;BR /&gt;grdraw to create glyphs that emulate AutoCAD's object snaps.  They are&lt;BR /&gt;amazingly fast..</description>
      <pubDate>Wed, 13 May 2020 13:28:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9512919#M74827</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-05-13T13:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9522085#M74828</link>
      <description>&lt;P&gt;Okay, here ya go.&amp;nbsp; A progressbar function in plain AutoLisp&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun @progressbar (ang color % / i 1/2pi pixel nh ss vc vw LL UR p p1 p2 p3 p4)
  ;; ang is the horizontal angle of the bar in preparation for handling twisted views (future)
  ;;   It currently works only for an angle of zero in a non-twisted view
  ;; color is any of the normal AutoCAD color integers from 1 though 255
  ;; % is an integer representing the percent progress
  ;; Note that all these computations are repeated with each change in % because the user
  ;;   may have zoomed in or out randomly any number of times, so the values can keep changing.
  ;; The position of the bar in this initial release is always at the lower left corner of the screen.
  ;; It is intended that future releases will provide options for TL, TC, TR, BL, BC, BR
  ;; The dimensions were selected to please the author;
  ;;    feel free to change them to please yourself.
  (setq i 0.0
        1/2pi (* 0.5 pi)
        ss (getvar "screensize") ;; in pixels
        vc (getvar "viewctr") ;; in dwg units
        vs (getvar "viewsize") ;; view height in dwg units
        vw (* vs (apply '/ ss)) ;; view width in dwg units
        wid (* 0.25 vw) ;; bar width in dwg units
        ht (* 0.15 wid) ;; bar height in dwg units
        pixel (/ vs (cadr ss)) ; pixel height in dwg units
        nh (fix (/ ht pixel))
        LL (mapcar '- vc (mapcar '* '(0.5 0.5)(list vw vs)))
        UR (mapcar '+ vc (mapcar '* '(0.5 0.5)(list vw vs)))
        p (polar LL (angle LL UR)(* 0.05 (distance LL UR)))
        p1 p
        p2 (polar p1 1/2pi ht)
        p3 (polar p1 ang wid)
        p4 (polar p2 ang wid)
  )
  (repeat (max 4 (fix (* nh 0.1)))
    (grdraw p1 p2 254) ;; border point
    (grdraw p2 p4 254) ;; border point
    (grdraw p1 p3 254) ;; border point
    (grdraw p3 p4 254) ;; border point
    (setq p1 (polar p1 (+ ang (* 1.25 pi))(* 1.414 pixel))
               p2 (polar p2 (+ ang (*  0.75 pi))(* 1.414 pixel))
               p3 (polar p3 (+ ang (*  1.75 pi))(* 1.414 pixel))
               p4 (polar p4 (+ ang (*  0.25 pi))(* 1.414 pixel))
    )
  )
  (setq p1 p)
  (repeat nh
    (setq p2 (polar p1 ang (* 0.01 wid %)))
    (grdraw p1 p2 color)
    (setq p1 (polar p1 1/2pi pixel))
  )
)
(defun @progresstest ( / %)
  (setq % 0.0)
  ;; The following while loop is just for testing.
  ;; In real use, you must keep track of the % of progress, and
  ;; call the @progressbar function each time it changes.
  ;; In this test, just move your cursor around to see the progress,
  ;;    or type anything on the keyboard, or both.
  (while (and (grread 1)(&amp;lt;= % 100))
    (@progressbar 0.0 4 (setq % (1+ %)))
  )
  (princ "\nDone.")
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 17 May 2020 15:23:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9522085#M74828</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-05-17T15:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying program progress on screen not a progressbar</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9522786#M74829</link>
      <description>&lt;P&gt;Another method&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq str "")
(setvar 'cmdecho 0)
(repeat 100
(setq str (strcat str "0"))
(setvar "modemacro" str)
(command "delay" 100)
)
(setvar "modemacro" "")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 18 May 2020 03:55:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/displaying-program-progress-on-screen-not-a-progressbar/m-p/9522786#M74829</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-05-18T03:55:57Z</dc:date>
    </item>
  </channel>
</rss>

