As I do Civil / Survey drawings whose plan views are all twisted in each viewport I wrote this to set selected block insert, text, mtext, & dimtext angles Horizontal.
I've modified it for you to use the snap angle if the view isn't twisted.
;| ;| https://forums.augi.com/showthread.php?171018-rotate-text-to-horizontal-in-viewport&p=1332928&viewfull=1#post1332928
http://www.theswamp.org/index.php?topic=55060.msg595136#msg595136
https://www.cadtutor.net/forum/topic/68912-setvar-snapang-using-lisp-with-greater-than-or-equal-condition/?tab=comments#comment-557172
Set block insert, text, mtext, & dimtext angle Horizontal by Tom Beauford
(load "TextHoriz.lsp") TextHoriz
Macro: ^P(or C:TextHoriz (load "TextHoriz.lsp"));TextHoriz
Command line: (load "TextHoriz.lsp") TextHoriz |;
(defun c:TextHoriz (/ ss1 num cnt viewtwist snapang etype obj dimr)
(setq ss1 (ssget '((0 . "insert,mtext,text,dimension")))
num (sslength ss1)
cnt 0
viewtwist (getvar "viewtwist")
snapang (- (rem (+ (getvar 'snapang) (/ pi 2.0)) pi) (/ pi 2.0))
)
(if (or (= snapang (* (/ pi 2) -1)) (= snapang (* (/ pi 2) 3)))(setvar 'snapang (/ pi 2)))
(if(/= viewtwist 0.0)
(repeat num
(setq ent (ssname ss1 cnt)etype (cdr(assoc 0 (entget ent))))
(setq obj (vlax-ename->vla-object ent))
(if(= etype "DIMENSION")
(progn
(setq dimr (- (vla-get-Rotation obj)viewtwist))
(vla-put-TextRotation obj dimr)
)
(vla-put-Rotation obj (- viewtwist))
)
(setq cnt (1+ cnt))
) ; repeat
(repeat num
(setq ent (ssname ss1 cnt)etype (cdr(assoc 0 (entget ent))))
(setq obj (vlax-ename->vla-object ent))
(if(= etype "DIMENSION")
(progn
(setq dimr (+ (vla-get-Rotation obj)snapang))
(vla-put-TextRotation obj dimr)
)
(vla-put-Rotation obj snapang)
)
(setq cnt (1+ cnt))
) ; repeat
; (princ "\nNo TWist in Viewport.")
) ; if
(princ)
)