Regards @autocad123_asd
Try this code with a small edit for multiple selection.
(defun c:ChangeDimObject2 (/ lsn j EntData Pt1 Pt2 Pt3)
(setq
lsn (vl-remove-if 'listp
(mapcar 'cadr (ssnamex (ssget '((0 . "DIMENSION")))))
)
)
(foreach j lsn
(setq EntData (entget j)
Pt1 (cdr (assoc 13 EntData))
Pt2 (cdr (assoc 14 EntData))
Pt3 (cdr (assoc 11 EntData))
)
(if (< (car Pt1) (car Pt2))
(command "_.ucs" "_3" Pt1 Pt2 (polar Pt1 (+ (DTR 90) (angle Pt1 Pt2)) 5))
(command "_.ucs" "-3" Pt2 Pt1 (polar Pt2 (+ (DTR 90) (angle Pt2 Pt1)) 5))
)
(entdel j)
(command "_.dim"
"_horizontal"
(trans Pt1 0 1)
(trans Pt2 0 1)
(trans Pt3 0 1)
""
"_exit"
)
(command "_.ucs" "_p")
)
)
;___
(defun dtr (deg) (* (/ deg 180.0) pi))
Carlos Calderon G

>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.