Author Topic: Upgraded Text 2 MText  (Read 22537 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Upgraded Text 2 MText
« on: September 27, 2009, 02:20:28 PM »
Text-2-MText Upgraded
Version 2.0




Program will allow the user to amalgamate several separate DTEXT & MTEXT entities into a single MTEXT entity, with all formatting kept in tact.

Text will take on the layer of the first text entity chosen (as in the txt2mtxt.lsp), but will keep its colour if not set to BYLAYER.

There are two modes: "Same Line" "New Line", which can be switched by pressing space between selections.

Shift-Clicking on Text will keep the original Text in place, and pressing "u" between selections will undo the previous selections.

Example:




Your thoughts are welcome  :-)

Code updated to Version 2.0

Code available here.
« Last Edit: November 14, 2010, 08:09:46 PM by Lee Mac »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Upgraded Text 2 MText
« Reply #1 on: September 27, 2009, 03:46:12 PM »
Interesting but no use for me in my environment.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Upgraded Text 2 MText
« Reply #2 on: September 27, 2009, 04:16:08 PM »
Interesting but no use for me in my environment.

I wasn't sure how many people really use the txt2mtxt function, I just thought I'd toy with the idea as it suddenly came to me when I was playing around with your new toy  :-)

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Upgraded Text 2 MText
« Reply #3 on: September 27, 2009, 05:50:34 PM »
I have updated the first post, you can switch modes by pressing space during text selection  :-)

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Upgraded Text 2 MText
« Reply #4 on: September 27, 2009, 08:16:16 PM »
wow ! Lee !!  I can't beleive it..

That was one of my project list !! OMG..
But you did better than i was thinking of..

Nice one !!

Yes, Me and some user here are interested about it. this will be very useful here.

Thanks for sharing. :-)
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Upgraded Text 2 MText
« Reply #5 on: September 28, 2009, 05:04:18 AM »
wow ! Lee !!  I can't beleive it..

That was one of my project list !! OMG..
But you did better than i was thinking of..

Nice one !!

Yes, Me and some user here are interested about it. this will be very useful here.

Thanks for sharing. :-)

I thought that might be coming... we seem to come up with the same ideas quite frequently...   :wink:

Thanks Andrea  :-)

mkweaver

  • Bull Frog
  • Posts: 352
Re: Upgraded Text 2 MText
« Reply #6 on: September 29, 2009, 07:23:41 AM »
Just a preview of what I am working on currently - wasn't sure if it was worth continuing with...

(snippage)

Your thoughts are welcome  :-)

I can certainly use this.  Thanks for sharing!

Mike

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Upgraded Text 2 MText
« Reply #7 on: September 29, 2009, 11:51:14 AM »
I can certainly use this.  Thanks for sharing!
Same here for me.  Thanks.

Two questions. 
One; could this be made to work on MText as well as Dtext?   I have a bunch of users that places little pieces of Mtext (objects)  :pissed: instead of placing all of them in one Mtext object.  It would save the step of exploding the objects to Dtext.

And two; what format code are using for "hard character return"?   When viewed in properties pallet it shows up as squares instead of "\P". 
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Upgraded Text 2 MText
« Reply #8 on: September 29, 2009, 01:59:10 PM »
Just a preview of what I am working on currently - wasn't sure if it was worth continuing with...

(snippage)

Your thoughts are welcome  :-)

I can certainly use this.  Thanks for sharing!

Mike

Thanks Mike, not a problem  :-)

I can certainly use this.  Thanks for sharing!
Same here for me.  Thanks.

Two questions. 
One; could this be made to work on MText as well as Dtext?   I have a bunch of users that places little pieces of Mtext (objects)  :pissed: instead of placing all of them in one Mtext object.  It would save the step of exploding the objects to Dtext.

And two; what format code are using for "hard character return"?   When viewed in properties pallet it shows up as squares instead of "\P". 

One: You should be able to use it to amalgamate MTEXT & DTEXT into a single MTEXT entity, with all the formatting in tact  :wink:

Two: I use "\n" for the new line, but I shall look into "\P" instead.

Thanks Mr Krush :-)

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Upgraded Text 2 MText
« Reply #9 on: September 29, 2009, 02:06:38 PM »
One: You should be able to use it to amalgamate MTEXT & DTEXT into a single MTEXT entity, with all the formatting in tact  :wink:

*Matt runs off to Google "amalgamate"...* 
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Upgraded Text 2 MText
« Reply #10 on: September 29, 2009, 02:22:16 PM »
One: You should be able to use it to amalgamate MTEXT & DTEXT into a single MTEXT entity, with all the formatting in tact  :wink:

*Matt runs off to Google "amalgamate"...* 
+ :-)
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Upgraded Text 2 MText
« Reply #11 on: September 29, 2009, 02:24:52 PM »
 :-)  :-)

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Upgraded Text 2 MText
« Reply #12 on: September 29, 2009, 02:43:18 PM »
One; could this be made to work on MText as well as Dtext?   I have a bunch of users that places little pieces of Mtext (objects)  :pissed: instead of placing all of them in one Mtext object.  It would save the step of exploding the objects to Dtext.
One: You should be able to use it to amalgamate MTEXT & DTEXT into a single MTEXT entity, with all the formatting in tact  :wink:

Returns the following at the command line when I go to select the second Mtext Object when in "NewLine" Mode.
Code: [Select]
Command: T2M
Initializing...
ø¤º°`°º¤ø  Text2MText2.lsp ~ Copyright © by Lee McDonnell  ø¤º°`°º¤ø
   ~¤~              ...Type "T2M" to Invoke...                ~¤~
Select Text:
øø Current Mode: New Line øø; error: An error has occurred inside the *error*
functionAutomation Error. Object was erased
Command:

I tried to watch it and see where it was breaking with the debug tools but the vlisp editor is always whited out. 
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Upgraded Text 2 MText
« Reply #13 on: September 29, 2009, 03:30:12 PM »
I shall investigate Krushert - thanks for the feedback mate  :wink:

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Upgraded Text 2 MText
« Reply #14 on: September 29, 2009, 03:43:17 PM »
Krushert,

I haven't been able to replicate your error when testing - but I have updated the code to make it slightly more robust - it may not fix the issue, but it should make the error more transparent.  :wink:

Lee