I have a function that does a 3d extrusion for a specified height on 3dfaces.
I am trying to setup a progress bar as I intend to use this routine on files with 1000's of 3dfaces and want to show that things are happening.
I have found a few helpful posts that I have copied and modified that have got me close to a solution using grtext to write to the status bar.

The issue I have is that the grtext line is not executed until the while loop is finished which defeats the purpose.

I have tried nomutt and clipromptupdate system variables which do not seem to change anything.

Anyone know how to force the lisp to update the command line or status bar.

Below is code:

Code:
;;;======================================================;;; EXTZ - EXTrude in Z direction
;;;======================================================
; Function to Extrude 3D Faces in Z Direction
; Modified by Steve Griffiths


(defun c:extz (/ exht ls len ctr ctrprogress *error* msg )
  (vl-load-com);Allow Visual LISP ActiveX functions
  (Echo_Off);Turn off command visibility
  (defun *error* ( msg ) ;Define Error Function
    (if adoc (vla-endundomark adoc))
    (Echo_restore);Restore Echo if Changed
    (PDMode_Restore);Restore Point Display if Changed
    (Snap_Restore);Restore Snap if Changed
    (if (not (member msg '("Function cancelled" "quit / exit abort"))) ;If Not Exit / Esc key
      (princ (strcat "\nError: " msg)) ;Print Error Message
    );End If
    (princ);Clean Exit
  );End defun error
=========================================================================
  (setq adoc (vla-get-activedocument (vlax-get-acad-object))) ;Set Current Document
  (vla-startundomark adoc) ;Set Undo Mark Start
  (Snap_off) ;Turn Snap Off
  ;(setvar "clipromptupdate" 1)
  ;(setvar "nomutt" 0)
  
  (setq exht (getreal "\nEnter extrusion height: ")) ;Get extrusion height
  
  (prompt "\n <Enter> for All") ;Empty Set will select all
  (setq ls (ssget "_:L" '((0 . "3DFACE")))) ;Select only 3dfaces (Exclude Locked Layers)
  (if (= nil ls) (setq ls (ssget "x" (list (cons 0 "3DFACE"))))) ;All 3DFaces if Empty Selection Set
  (setq	len (sslength ls) ;Get length of selection set
	ctr 0) ;Set Counter


  (while (< ctr len) ;Cycle through Selection Set
    (setq ent (ssname ls ctr)) ;Get each entity	  
    (vl-cmdf "extrude" "MO" "SO" ent "" "d" "0, 0, 0" (strcat "0, 0, -" (rtos exht)));Extrude by specified height
    (setq ctrprogress (rem ctr 10))
    
	(setvar "modemacro" "$(getvar,USERS1)")
    (if (= ctrprogress 0)
      (progn
	(setq progbar (cond ((= progbar "|") "/")
				((= progbar "/") "--")
				((= progbar "--") "\\")
				((= progbar "\\") "|")
				((= t t) "|")
			  );End Conds
	);End Setq
	;(setvar "modemacro" progbar)
	;(prompt progbar)
	(grtext -1 (strcat progbar))


      )	; End Progn
    ); End If
    (princ)
    (setq ctr (1+ ctr));Increment counter    
  );end while
  (princ (strcat "\n" (itoa (fix len)) " 3D Faces Extruded down by " (rtos exht 2 2)));
  (PDMode_Restore);Restore Point Display if Changed
  (Snap_Restore);Restore Snap if Changed
  (vla-endundomark adoc) ;Set Undo Mark End
  (Echo_Restore);Restore Command Visibility
  (princ);Clean Exit
  )
Sample with 3dfaces
3dfaces testing.dwg

Thanks in Advance
Steve