I got this to work, sometimes. I haven't figured out why it's not working the other times. Maybe someone else can jump in on this too.
(defun c:diml2r (/ ss ents dim ent mang mpt npt)
;converts degrees to radians
(defun *dtr* (degrees) (* pi (/ degrees 180.0)))
;converts radians to degrees
(defun *rtd* (radians) (* 180.0 (/ radians pi)))
;Returns the Dimension entity name
(defun func (y)
(vl-remove-if-not
'(lambda (x)
(setq x (eq (cdr (assoc 0 (entget x))) "DIMENSION"))
)
y
)
)
;Returns Entity names from a Selection Set.
(defun *ssnames* (selection_set / num lst)
(repeat (setq num (sslength selection_set))
(setq num (1- num)
lst (cons (ssname selection_set num) lst)
)
)
lst
)
;Main Program
(and (setq ss (ssget '((0 . "DIMENSION,TEXT"))))
(setq ents (*ssnames* ss))
(setq dim (car (func ents)))
(setq ent (entget dim))
(setq mang (*dtr* (+ (*rtd* (cdr (assoc 50 ent))) 90)))
(setq
mpt (mapcar '/
(mapcar '+ (cdr (assoc 14 ent)) (cdr (assoc 13 ent)))
'(2.0 2.0 2.0)
)
)
(setq npt (polar mpt mang 1));;<==1 may need to be bigger for dif unit settings.
(not (command "_.mirror" "P" "" mpt npt "Y"))
)
(princ)
)