Way to 'glue' dtext...

Way to 'glue' dtext...

erickson123
Advocate Advocate
997 Views
8 Replies
Message 1 of 9

Way to 'glue' dtext...

erickson123
Advocate
Advocate
Hi All,

Remember the old 'glue' command in LDT? Is there a new command to 'glue' d-text in C3d 09? Thanks-

Lynn
0 Likes
998 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
I wrote this many moons ago.....

;;;Glue text together, Jeff Mishler's helper tools
(defun c:glu (/ *doc* ent1 ent2 obj1 obj2 txt1 txt2)
(vl-load-com)
(vla-startundomark (setq *doc* (vla-get-activedocument
(vlax-get-acad-object))))
(while (setq ent1 (car (entsel "\nSelect text to glue to: ")))
(and (wcmatch (cdr (assoc 0 (entget ent1))) "TEXT,MTEXT")
(setq obj1 (vlax-ename->vla-object ent1))
(not (vla-highlight obj1 :vlax-true))
(setq ent2 (car (entsel "\nSelect text to glue to first text: ")))
(wcmatch (cdr (assoc 0 (entget ent2))) "TEXT,MTEXT")
(setq obj2 (vlax-ename->vla-object ent2)
txt1 (vla-get-textstring obj1)
txt2 (vla-get-textstring obj2)
)
(not (vla-delete obj2))
(vla-put-textstring obj1 (strcat txt1 " " txt2))
(not (vla-highlight obj1 :vlax-false))
)
)
(vla-endundomark *doc*)
(princ)
)

"erickson123" wrote in message news:[email protected]...
> Hi All,
>
> Remember the old 'glue' command in LDT? Is there a new command to 'glue'
> d-text in C3d 09? Thanks-
>
> Lynn
0 Likes
Message 3 of 9

erickson123
Advocate
Advocate
YOU ROCK JEFF!!
Thanks, works great 🙂
0 Likes
Message 4 of 9

Hidden_Brain
Advisor
Advisor
wouldn't txt2mtxt do somewhat similar operation?
0 Likes
Message 5 of 9

erickson123
Advocate
Advocate
That turns it into Mtext. Great command and I love Mtext but sometimes just want text to remain as Dtext.
0 Likes
Message 6 of 9

Anonymous
Not applicable
Lynn,

Not challenging you - just curious. In the past five years (or longer), I have not personally seen ANY benefits to Dtext where it was not easier, better, and/or more flexible with Mtext. Any Dtext in a drawing, I will immediately convert to Dtext.

I am just curious in what instances you personally felt Dtext was more convenient/better, etc.

Josh Modglin
InMotion Consulting
http://www.inmotioncon.com
0 Likes
Message 7 of 9

erickson123
Advocate
Advocate
Hi Josh,

....Thanks for asking.....I mostly use MText, but I'm working on an exhibit right now with a lot of street names. In this case I like Dtext, mostly because I like the edit box that comes up and after editing I can hit the enter key to exit the command....definitely like all the imporovements they have made over the years to Mtext!

Lynn
0 Likes
Message 8 of 9

Anonymous
Not applicable
For single line text with no variation in formatting,
TEXT has lower overhead than MTEXT. AutoCAD
has to do less work to render TEXT verses MTEXT.
TEXT also consumes less memory and space in a
file, etc., and as Lynn says, it's just plain easier
to edit, especially en masse.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:[email protected]...
Lynn,

Not challenging you - just curious. In the past five years (or longer), I have
not personally seen ANY benefits to Dtext where it was not easier, better,
and/or more flexible with Mtext. Any Dtext in a drawing, I will immediately
convert to Dtext.

I am just curious in what instances you personally felt Dtext was more
convenient/better, etc.

Josh Modglin
InMotion Consulting
http://www.inmotioncon.com
0 Likes
Message 9 of 9

Anonymous
Not applicable
Usually the single line text is the reason I have heard. However, I have just found it rare when you could say for certainity (100%) that this one line will never turn into multi-lines.

It is good to see a coder concerned about memory usage but when dealing with 10mb surfaces and other objects, I don't personally see how giving up the formatting (including quickly stretching from single to multi-line) would be worthwhile. Just personal preference.

Seeing that the editor for both Text and Mtext is the same Lynn must either click enter twice or override the default Dtext editor which works for him (her?).

Thanks for the ideas though. It never hurts to hear why b/c there are many reasons to use it I am sure I haven't thought of.

Josh Modglin
InMotion Consulting
http://inmotioncon.com
0 Likes