Author Topic: MText Format Stripper  (Read 14810 times)

0 Members and 1 Guest are viewing this topic.

Shade

  • Guest
MText Format Stripper
« on: June 21, 2007, 11:48:48 AM »
Anyone have a Mtext Format stripper lisp.

I would like the mtext in my drawing to match the the style set in the textstyle, not what is shown in the overrides.

Ie. My text style is Romans; the mtext is set to romans style but shows Arial and 1/2 the size.
I wish to eliminate the 1/2 size and the arial font style from the text.

Any help would be apprecited...


Guest

  • Guest
Re: MText Format Stripper
« Reply #1 on: June 21, 2007, 12:00:47 PM »
Do a search for STRIPMTEXT.

Slimę

  • Needs a day job
  • Posts: 6565
  • The Dude Abides...
Re: MText Format Stripper
« Reply #2 on: June 21, 2007, 12:03:18 PM »
Do a search for STRIPMTEXT.

You might try Steve Doman as well. He wrote it.
I drink beer and I know things....

CAB

  • Global Moderator
  • Seagull
  • Posts: 10377
Re: MText Format Stripper
« Reply #3 on: June 21, 2007, 12:13:33 PM »
Yes.  :-)
http://www.theswamp.org/index.php?topic=7272.0


PS Steve's has more user options than mine. Mine strips everything.
« Last Edit: June 21, 2007, 12:15:44 PM by CAB »
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.

Shade

  • Guest
Re: MText Format Stripper
« Reply #4 on: June 21, 2007, 12:17:45 PM »
I have found several linkz for the lisp but they are all dead!

Anyone have a live copy?  :cry:

Slimę

  • Needs a day job
  • Posts: 6565
  • The Dude Abides...
Re: MText Format Stripper
« Reply #5 on: June 21, 2007, 12:25:27 PM »
As it is in the public domain.
I drink beer and I know things....

Sdoman

  • Guest
Re: MText Format Stripper
« Reply #6 on: June 21, 2007, 04:06:42 PM »
As it is in the public domain.

That looks like my old beta 4 version of StripMText, which was never completed due to a variety of reasons.  Better to use v3.09 which can be downloaded at http://cadabyss.wordpress.com/

I have restarted working on the next version of StripMtext BTW.  Any wish lists, comments, or suggestions gladly accepted.



Slimę

  • Needs a day job
  • Posts: 6565
  • The Dude Abides...
Re: MText Format Stripper
« Reply #7 on: June 22, 2007, 12:23:19 AM »
Thanks Steve, it has been very helpful.

And you did say in the header that it was in the public domain. :-)
« Last Edit: June 22, 2007, 12:25:11 AM by Slimę »
I drink beer and I know things....

Sdoman

  • Guest
Re: MText Format Stripper
« Reply #8 on: June 22, 2007, 09:02:25 AM »
Thanks Steve, it has been very helpful.

And you did say in the header that it was in the public domain. :-)

No problemo Slim.  Public Domain is correct.  Thanks for posting!

hudster

  • Gator
  • Posts: 2846
Re: MText Format Stripper
« Reply #9 on: June 22, 2007, 10:47:26 AM »
Any wish lists, comments, or suggestions gladly accepted.

A command line version would be great.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Sdoman

  • Guest
Re: MText Format Stripper
« Reply #10 on: June 22, 2007, 10:56:12 AM »
Any wish lists, comments, or suggestions gladly accepted.

A command line version would be great.

You got it.  Thanks for the feedback.

Sdoman

  • Guest
Re: MText Format Stripper
« Reply #11 on: June 26, 2007, 08:51:54 AM »
Andy and others,

Regarding a command line option, I was think of introducing a minus command "-stripmtext".   In the current version, the DCL dialog makes choosing format options very easy.  How do you imagine the user entering options at the command line? 

I was thinking maybe the user entering a comma delimited string, like the old OSNAP command.  This means the user entering a rather cryptic, hard to remember string.   For font, color, stacking, paragraph, alignment, width, and tracking, the user would enter something like "F,C,S,P,A,W,T".  Of course I'd include an option to pop up the options dialog from the command line. 

Thanks


Just added the following claification:
 "...like the old OSNAP command." 
Meaning: -OSNAP command


« Last Edit: June 26, 2007, 03:21:30 PM by 'steved »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10377
Re: MText Format Stripper
« Reply #12 on: June 27, 2007, 11:47:12 AM »
Wouldn't a command line version look like this?
Code: [Select]
command: -stripmtext
Enter options: "ACFHLOPQStTW~", *=ALL, Enter= Dialog Box:

Or This:
Code: [Select]
command: -stripmtext
Remove All Formats found [Y/N]: 
Remove  Alignment [Y/N]:
Remove  Color [Y/N]:
Remove  Font [Y/N]:
Remove  Height [Y/N]:
Remove  Underscore [Y/N]:
Remove  Overscore [Y/N]:
Remove  Linefeed  [Y/N]:
Remove  Obliquing [Y/N]:
Remove  Spacing (Stacking) [Y/N]:
Remove  Tabs [Y/N]:
Remove  Tracking    [Y/N]:
Remove  Width [Y/N]:
Remove  Non-breaking Space [Y/N]:


Or you could call the subroutine directly from your lisp
Code: [Select]
(stripmtext Mtext Formats)
Where
Code: [Select]
(defun stripmtext (Mtext Formats)
  (UnFormat Mtext Formats)
)
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.

Shade

  • Guest
Re: MText Format Stripper
« Reply #13 on: June 27, 2007, 02:25:00 PM »
Thanks everyone for the help!
Appreciated

Sdoman

  • Guest
Re: MText Format Stripper
« Reply #14 on: June 28, 2007, 09:09:28 AM »
Wouldn't a command line version look like this?
Code: [Select]
command: -stripmtext
Enter options: "ACFHLOPQStTW~", *=ALL, Enter= Dialog Box:

Thanks CAB. I like your first suggestion because it is simple and fast.  The only problem I see with it that a first time user might not understand what to do.  I would need to add "?" for Help.  Your other example would be slower to key in, and the user might be annoyed at having to answer all those prompts.

Or you could call the subroutine directly from your lisp

The current version exposes a function, (stripmtext ss formats), where ss is a selection set of Mtext objects and formats is a concatenated string of format codes.  I added this feature per requests for a version that could be run by script.  It was the quick solution.  The better solution for scripts IMO, is to use the proposed command line version.

I am thinking of removing the exposed stripmtext function, and exposing John's Unformat function, (UnFormat Mtext Formats), which expects a single Mtext string and the format codes. 

Actually in the next version, I am working on a totally new parsing engine, so the expose function will be something else.


Thanks everyone for the help!
Appreciated

Shade, From all of use to you "Your welcome!" .

Sorry, I didn't mean to hijack your thread. I should have started a new one regarding new features.