@saqib_tipa wrote:
.... or you can make radius bigger than 5 ....
Something like this? [minimally tested]:
(defun C:T2MG ; = Text {to} Mtext in Groups
(/ ss n txt ble tt)
(if (setq ss (ssget '((0 . "TEXT") (8 . "PIPE"))))
(repeat (setq n (sslength ss))
(setq txt (ssname ss (setq n (1- n))))
(if (entget txt); still exists [not absorbed into Mtext yet]?
(progn ; then
(setq ble (cdr (assoc 10 (entget txt)))) ; = baseline left end
(if
(> ; more nearby?
(sslength
(setq tt
(ssget "_C" (mapcar '- ble '(10 10)) (mapcar '+ ble '(10 10))
'((0 . "TEXT") (8 . "PIPE"))
); ssget
); setq
); sslength
1
); >
(command "_.txt2mtxt" tt ""); then
); if [multiple text in area]
); progn
); if [txt still exists]
); repeat
); if [text selection]
(prin1)
); defun
I used the 10-code entry [left end of baseline] as the basis point, because it's always the same regardless of justification. Probably the insertion point would do, too [I didn't experiment].
For some reason I can't figure out, some of them come out with appropriate-looking line spacings [left], and some with extra spacing between some lines [right] (which is not from Enters for blank lines):

It could be related to the rotation angle, and the particulars of the staggering of insertion points, and something about how TXT2MTXT considers relative positions, because there's one that ends up really wacky:

and it's the only one at a rotation anything like that. [See EDIT below.] Those like the right one in my first image also have the D:S:L: order rather than the S:D:L: order of the originals. Those are all under the sort-top-down mode in TXT2MTXT. It seems not to happen if in the select-order-of-objects mode when done manually, but if that's the setting ahead of time, under this selection-set approach yours all get reversed in order. It may be possible to feed them into the command in the right sequence, but I think it would be quite a challenge to work out.
I don't understand why those that look right have the extra line spacing between the first two lines, either, but at least it gives a nicer result than if the line spacings were equal.
[EDIT: It's the combination of rotation in relation to stagger of insertion points. That result is, in fact, in order of the raw never-mind-the-rotation Y components of their insertion points, from top to bottom, under sort-top-down mode. But I still don't get the irregularity of the line spacing.]
Kent Cooper, AIA