Display full version of the post: arranging text
If I have text scatterd at many different elevations and want to move them all at once to one specific elevation, how would I do this?
Hey tmnmatt,
You could try selecting all the text, then go into properties and change the Z-value.
Hope that works,
nameci
you can try the lisp below:
"
(defun C:TALIGN(/ ang newpt p1 p2 p3 p4 chk ss sl i ref opt n rlist elist el1 ep)
(setq ss (ssget) sl (sslength ss) i 0
ref (car(entsel "\nPick the reference TEXT: "))
chk (reverse(cdr(reverse(assoc 11 (entget ref)))))
ang (cdr(assoc 50 (entget ref)))
)
(initget "Ver Hor")
(setq opt (getkword "\nAlign TEXT Vertically or Horizontally <Hor>? "))
(if (not opt) (setq opt "Hor"))
(if (equal chk '(11 0.0 0.0)) (setq n 10) (setq n 11))
(setq rlist (assoc n (setq elist (entget ref))))
(repeat sl
(setq el1 (entget(ssname ss i)) ep (assoc n el1))
(if (= opt "Hor")
(progn
(setq p1 (cdr rlist) p2 (polar p1 ang 5.0)
p3 (cdr ep) p4 (polar p3 (+ ang (/ pi 2)) 5.0)
newpt (inters p1 p2 p3 p4 nil)
)
(entmod (subst (list (car ep) (car newpt) (cadr newpt) (last ep)) ep el1))
)
(progn
(setq p1 (cdr rlist) p2 (polar p1 (- ang (/ pi 2)) 5.0)
p3 (cdr ep) p4 (polar p3 ang 5.0)
newpt (inters p1 p2 p3 p4 nil)
)
(entmod (subst (list (car ep) (car newpt) (cadr newpt) (last ep)) ep el1))
)
)
(setq i (1+ i))
)(prin1)
)
"