Okay, here ya go. A progressbar function in plain AutoLisp
(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)(<= % 100))
(@progressbar 0.0 4 (setq % (1+ %)))
)
(princ "\nDone.")
)