@Anonymous,
Here is some code that will "toggle" the Status Bar, Coords display in the registry.
;;; Toggle the Status Bar Coordinate Display value in the system registry
;;; for the current user and current profile
;;; J. Berns 2021-05-07
(defun C:RegCoordToggle ()
;; load Visual LISP
(vl-load-com)
;; set registry path to status bar
(setq RegStatBar
(strcat
"HKEY_CURRENT_USER\\" ;; current user
(vlax-user-product-key) ;; user product key
"\\" ;; separator
(getvar "cprofile") ;; current profile
"\\StatusBar\\Application" ;; where Coords is managed
) ;_strcat
) ;_setq
;; toggle the value
(if (= 0 (vl-registry-read RegStatBar "CursorCoordinatesPane"))
(progn
(vl-registry-write RegStatBar "CursorCoordinatesPane" 1) ;; ON
(princ "\nStatusBar Coords = On")
) ;_progn
(progn
(vl-registry-write RegStatBar "CursorCoordinatesPane" 0) ;; OFF
(princ "\nStatusBar Coords = Off")
) ;_progn
) ;_if
(princ)
)
However, you must exit and restart AutoCAD. Not much of a toggle I know, but I could not find any other way to "refresh" the status bar. Neither toggling the bar off/on (STATUSBAR) or toggling another option in the status bar menu would "refresh" the bar.
I would welcome feedback or suggestions to avoid the AutoCAD restart.
Regards,
Jerry
-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional