Ok, check this one:
(defun c:AboveDimLine ( / s i e c10 c11 c13 c14 c100 p11 n11)
(if (setq s (ssget "_:L" '((0 . "DIMENSION"))))
(repeat (setq i (sslength s))
(setq e (ssname s (setq i (1- i))))
(and (mapcar '(lambda (x) (set (read (strcat "c" (itoa x))) (cdr (assoc x (reverse (entget e)))))) '(10 11 13 14 100))
(vl-position c100 '("AcDbAlignedDimension" "AcDbRotatedDimension"))
(setq x09 (inters c10 (polar c10 (+ (angle c14 c10) (/ pi 2)) 1) c13 (polar c13 (angle c14 c10) 1) nil))
(setq p11 (inters c11 (polar c11 (+ (angle x09 c10) (/ pi 2)) 1) x09 c10 nil))
;;(setq n11 (polar c11 (angle c11 p11) (* 2 (distance c11 p11))))
(setq n11 (polar c11 (angle c11 p11) (* 2 (distance c11 p11))))
;;(setq n11 (polar c11 (/ 3.1415 2) (* -2 (distance c11 p11))))
;;changes
(progn
(if (> (car c11) (car p11))
(not (setpropertyvalue e "TextPosition/X" (car n11)))
)
(if (< (cadr c11) (cadr p11))
(not (setpropertyvalue e "TextPosition/Y" (cadr n11))))))
)
)
;end of changes
;;(command "circle" c11 "400" "") ;;c11 is old dimtext point
;;(command "circle" n11 "400" "") ;;n11 is new dimtext point
;;(command "circle" p11 "400" "") ;;p11 is point on dimline
;;(command "circle" x09 "400" "") ;;x09 is start point of dimline
(princ)
)
The problem was that i wasn't seeing Your fonts, must change it. The property "above" "under" was changing but the text real position not.
Modded the code which was working to check if dim is below line.
NOTE: there are still some dimensions for which the code is not working, but the orginal code which You gave also didn't. The problem is in dimensions, becouse the center of dimtext is not parpendicular to dimline center.