Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

ВeekeeCZ
en respuesta a: Patchy

Text version.

 

(defun c:TextShift  ( / s p g1 g2 i e d e1 e2 x c)

  (if (and (setq p (cadr (entsel "\nSelect target edge: ")))
	   (setq s (ssget "_:L" '((0 . "TEXT"))))
	   (setq g1 (trans (osnap p "_end") 1 0))
	   (setq g2 (trans (osnap p "_nea") 1 0))
	   )
    (repeat (setq i (sslength s))
      (setq e (ssname s (setq i (1- i)))
	    d (entget e)
	    e1 (cdr (assoc (setq c (if (= 0 (cdr (assoc 72 d)) (cdr (assoc 73 d))) 10 11)) d))
	    e2 (polar e1 (cdr (assoc 50 d)) 1.)
	    x (inters e1 e2 g1 g2 nil))
      (entmod (subst (cons c x) (assoc c d) d))))
  (princ)
  )