For only....
@Anonymous wrote:
Request help
After selection Ordinatedim Straighten
Same as the picture
Thank

Try this......
(defun C:AOD ( / N_IP_Text IP_Line IP_Text Dir);;put temp variables here
(command "CMDECHO" 0)
(princ "\nSelect Ordinate dimension to align: ")
(Setq SS (ssget '((0 . "DIMENSION"))))
(setq OSM (getvar "OSMODE"))
(setvar "osmode" 0)
(repeat (setq N (sslength SS))
(setq Data (ssname SS (setq N (- N 1))))
(setq EntityData (entget Data))
(setq Dir (cdr (assoc 70 (entget Data))))
(setq IP_Line (cdr (assoc 13 EntityData)))
(setq IP_Text (cdr (assoc 14 EntityData)))
(if (= Dir 38)
(setq N_IP_Text (list (nth 0 IP_Text) (nth 1 IP_Line) 0.0))
(setq N_IP_Text (list (nth 0 IP_Line) (nth 1 IP_Text) 0.0))
)
(entmod (subst (cons 14 N_IP_Text) (assoc 14 EntityData) EntityData))
)
(setvar "osmode" OSM)
(command "CMDECHO" 1)
(princ)
)
Tested in AutoCAD 2007 hopefully work in upper version.....
Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....