Here is the one I use, works when you are in a rotated UCS.
;; CAB 10/04/2005
;; Correct rotated dimension to reflect the current UCS
;; Used when elevations are mirrored in a drawing
;; Updates DXF code 51
(defun c:dimrot (/ d elst ang)
(and
(setq d (entsel))
(setq elst (entget (car d)))
(setq ang (- (* 2 pi)
(angle (trans '(0.0 0.0 0.0) 1 0)
(trans '(1.0 0.0 0.0) 1 0)
)
)
)
;; prevent 2 * pi
(if (equal ang (* 2 pi) 0.0001) (setq ang 0.0) t)
(setq elst (subst (cons 51 ang) (assoc 51 elst) elst))
(entmod elst)
)
(print ang)
(princ)
)