Hi,
I wrote the following lisp:
(defun c:TEST (/ )
(setq var (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
;--------------------------------------
(vl-load-com)
(setq path (getfiled "Select a dwg file" "" "dwg" 8))
(setq path (vl-filename-directory path))
(setq listafile (vl-directory-files path "*.dwg"))
;--
(setq n 0)
(setq n_tot (length listafile))
;--
(foreach el listafile
(setq pathfiledwg (strcat path "\\" el))
(setq pathfileplt (strcat (vl-string-right-trim ".dwg" pathfiledwg) ".plt"))
(princ pathfileplt)
(command "_.-insert" pathfiledwg "0,0,0" "1" "1" "0")
(setq bloccogrigliacorrente (entlast))
(command "_.-plot" "_n" "" "" "" "_y" pathfileplt "_n" "_y")
(entdel bloccogrigliacorrente)
(setq n (+ n 1))
(princ (strcat "\nI'm processing the object " (itoa n) " of " (itoa n_tot))) ;<----------------------------PROBLEM!!!!!!!!!!!!!!!!!!!!!!!!!
)
;--------------------------------------
(setvar "cmdecho" var)
)
(princ........) is displayed 7 or 8 times and then the command bar is not updated until the entire function.
Is there a way to force the update of the command bar?