Author Topic: Mirror to Text, Mtext and Leader  (Read 1721 times)

0 Members and 1 Guest are viewing this topic.

amc.dicsac

  • Newt
  • Posts: 109
  • Autocad 2008
Mirror to Text, Mtext and Leader
« on: April 28, 2016, 12:09:01 PM »
Hello such, I have a lisp that makes a mirror (copy and change without justification) to text or mtext with leader the problem is that I can not perform the mirror with a copy attached dwg

Code: [Select]
(defun c:MTD (/ ssosmode ss pt1 pt2 ename)
(setvar "cmdecho" 0)
(setvar "orthomode" 1)
(setq ssosmode (getvar "osmode"))
(setq ss (ssget "_:L"(list (cons 0 "MTEXT,TEXT,LEADER"))))
(setq pt1 (getpoint "\n>> Especifique punto: "))
(setvar "osmode" 0)
(setq pt2 (getpoint pt1 "\n>> Especifique siguiente punto: "))
(grdraw pt1 pt2 150 4)
(vl-cmdf "._mirror" ss "" pt1 pt2 "_y")
(setq x 0)
(setq ename4 (ssname ss x))
(cond ((= (cdr (assoc 0 (entget ename4))) "MTEXT") (vl-cmdf "justifytext" "p" "" "TR" ""))
            ((= (cdr (assoc 0 (entget ename4))) "TEXT") (vl-cmdf "_justifytext" "p" "" "BR" "")))
(setq i 0)
(while (setq ename (ssname ss i))
(if (= (cdr (assoc 0 (entget ename))) "TEXT")
(progn (ssdel ename ss)
(setq i (1- i))))
(if (= (cdr (assoc 0 (entget ename))) "MTEXT")
(progn (ssdel ename ss)
(setq i (1- i))))
(setq i (1+ i)))
(command "_mirror3d" ss "" "xy" "" "y")
(setvar "osmode" ssosmode)
(setvar "cmdecho" 1)
(princ))
<a href="http:/http://axprogramlisp.blogspot.pe" class="bbc_link" target="_blank">By Alexander Castro</a>

ChrisCarlson

  • Guest

amc.dicsac

  • Newt
  • Posts: 109
  • Autocad 2008
Re: Mirror to Text, Mtext and Leader
« Reply #2 on: April 28, 2016, 12:59:46 PM »
I do not think the solution is that because if you open the file and run the attached eh changing this lisp

Code: [Select]
(vl-cmdf "._mirror" ss "" pt1 pt2 "_y")
to this

Code: [Select]
(vl-cmdf "._mirror" ss "" pt1 pt2 "_N")
You will understand that it has nothing to do MIRRTEXT Variable  :no: :no:
<a href="http:/http://axprogramlisp.blogspot.pe" class="bbc_link" target="_blank">By Alexander Castro</a>

ChrisCarlson

  • Guest
Re: Mirror to Text, Mtext and Leader
« Reply #3 on: April 28, 2016, 01:10:34 PM »
I'm confused, mirrored the text and lines over the red dashed line. All properties remained constant eg; justify middle left on the yellow MTEXT/TEXT and bottom left on hello. Are you wanting to make a bottom left justify mirror to a bottom right?

ChrisCarlson

  • Guest
Re: Mirror to Text, Mtext and Leader
« Reply #4 on: April 28, 2016, 01:12:00 PM »
Also I suggest you clean up your annotation scales. You have an obscene amount, not including duplicates, triplicates, and quadruplicates.

amc.dicsac

  • Newt
  • Posts: 109
  • Autocad 2008
Re: Mirror to Text, Mtext and Leader
« Reply #5 on: April 28, 2016, 07:57:44 PM »
I enclose a video for you to realize what I try to do.  :thinking:



<a href="http:/http://axprogramlisp.blogspot.pe" class="bbc_link" target="_blank">By Alexander Castro</a>