Good morning all..
I have this little basic LISP who redefine text justification when mirror is done.
but I don't like it.....
and would be glad to see if any of you have a routine similar...or something else doing this.
(see picture)
(defun MIRR2 ()
(initget "Gd Dg")
(setq opt1 (getkword "Mirroir de GD ou DG <Droite Gauche>: "))
(if (eq opt1 nil)(setq opt1 "Dg"))
(setq mobjets (ssget))
(setq mob (sslength mobjets))
(setq val1 (- mob 1))
(repeat mob
(setq a1 (entget (ssname mobjets val1)));;détail de l'entité
(setq a2 (cdr (assoc 0 a1)))
(if (eq a2 "TEXT")
(progn
(setq spt_ins (cdr (assoc 10 a1))) ;;Insertion point
(if (eq opt1 "Dg") (command "_justifytext" (cdr (assoc -1 a1)) "" "_R"))
(if (eq opt1 "Gd") (command "_justifytext" (cdr (assoc -1 a1)) "" "_L"))
(setq val1 (- val1 1))
)
(setq val1 (- val1 1)))
)
(setq Mp1 (getpoint "Spécifiez le premier point de la ligne de symétrie:")
Mp2 (getpoint Mp1 "Spécifiez le deuxième point de la ligne de symétrie:"))
(command "_mirror" mobjets "" Mp1 Mp2 "_Y")
)