Text to Mtext then line up mtext in a column.

Text to Mtext then line up mtext in a column.

burniksapwet
Enthusiast Enthusiast
1,238 Views
3 Replies
Message 1 of 4

Text to Mtext then line up mtext in a column.

burniksapwet
Enthusiast
Enthusiast

The subject of my request will not make sense so I will post pictures. What I would like to request from you awesome people is this.

 

1 - Select all Text and Mtext layer called "Text-Legend" and "Text Legend 2" from only this coordinates X = 33.415669 Y = 21.226325 to X = 1.134419 Y = 2.506170.  (Basically, this is from the top right corner of the drawing to the bottom lefthand side of the drawing.)

Before 2.gif

 

Now copy everything that was selected over to the left side of the drawing. (Anywhere past the border.)

        - I would like to see if this is possible.

        - Turn everything that was copied into Mtext with a "Top Right" justification

        - I would like it to be "Lined Up" in a column like the picture. What I mean by this is have a "enter" at the end of the text so that they line up properly like that so that I can paste it in excel in a column.

        - Is there also a way to have everthing inside that Mtext be already copied in your clipboard for pasting? Thank you very much in advance guys.

After 2.gif

 

 

0 Likes
Accepted solutions (1)
1,239 Views
3 Replies
Replies (3)
Message 2 of 4

john.uhden
Mentor
Mentor

Looking from border to border it appears that many text objects line up horizontally (same Y).  How does one differentiate between which comes 1st, 2nd, 3rd, etc. in the Mtext column?  Is there a preset maximum width for the mtext or should the user be asked?

John F. Uhden

0 Likes
Message 3 of 4

Ranjit_Singh
Advisor
Advisor
Accepted solution

Try the below. It will use current mtext style.

(vl-load-com)
(defun c:somefunc (/ ent) (command "._-mtext" (getpoint "\nSpecify insertion point for combined text:") "_w" 0 (vl-string-right-trim "\\P" (apply 'strcat (acad_strlsort (mapcar '(lambda (x) (cond ((= (type (setq ent (cadr x))) 'ename) (strcat (cdr (assoc 1 (entget ent))) "\\P")) (T ""))) (ssnamex (ssget '((0 . "TEXT,MTEXT")))))))) "") (princ))
Message 4 of 4

burniksapwet
Enthusiast
Enthusiast

Thank you so much. I appreciate the time you took to reply and create this. Thank you thank you thank you.

0 Likes