Jump to content

Recommended Posts

Posted (edited)

Hello friends.

 

I use the "StripMtext v5-0b.lsp" code, which works wonders most of the time. But sometimes it doesn't remove all overrides. I have the following text override for example: \fArial|b0|i0;{\H49.8000;STC.Ø<>}

After using the StripMtext function it hasn't removed anything. When I manually open the MText edit and reset the text style it will remove these overrides. Does anyone know how to fix this?

 

EDIT: it does remove the font override but not the height.

Edited by ElAmigo
Posted

Can you post a .dwg with the MText that's behaves this way?

Posted

Sadly I can't post a dwg.

I just noticed the STRIPMTEXT functions does work but doesn't remove the \H49.8000;

Is it possible to write a LISP routine that searches for \H**.****; in the text override and remove it?

Posted
7 hours ago, ElAmigo said:

Sadly I can't post a dwg.

I just noticed the STRIPMTEXT functions does work but doesn't remove the \H49.8000;

Is it possible to write a LISP routine that searches for \H**.****; in the text override and remove it?

@ElAmigo,  well , at least upload an (entget (car (entsel)))  from shuich MTEXT

 

Posted
8 hours ago, ElAmigo said:

Is it possible to write a LISP routine that searches for \H**.****; in the text override and remove it?

I think you should contact Lee Mac, the author directly. He may know exactly what to change.

https://www.lee-mac.com/contact.html

Posted

I thought Lees was unformat and stripmtext was someone elses? Could try Lee Macs Unformat....

Posted

@Steven P Sorry you're correct. I was mixing up the 2 routines.

Posted

It is written by John Uhden and Steve Doman.

 

I am pretty sure John Uhden is still around.

 

From the header in the LSP...

 

;;;;  StripMtext Version 5.0b for AutoCAD 2000 and above
;;;;  Removes embedded Mtext formatting
;;;;
;;;;  Copyright© Steve Doman and Joe Burke 2010
;;;;
;;;;  The authors grant permission to use, copy, and modify this routine
;;;;  for personal use only and for the use of other AutoCAD users within
;;;;  your organization. Selling, modifying, or exchanging this software
;;;;  for a fee, or incorporation within a commercial software product, is
;;;;  expressly prohibited. All other rights are reserved by the authors.
;;;;
;;;;  Please send comments, wish lists, or bug reports to:
;;;;  cadabyss@gmail.com or lowercase@hawaii.rr.com
;;;; 
;;;;  Look for new stable releases at:
;;;;  http://cadabyss.wordpress.com/
;;;; 
;;;;  More information may also be found at:
;;;;  http://www.theswamp.org/
;;;;  Subforum: "Show your stuff", Subject: "StripMtext v5"

 

v5.0 01-01-10 "The Joe Burke RegExp Version"

 

An Update by Joe Burke.

 

As well as some instructions and known issues caused by AutoCAD.

 

I am sure the authors would love to hear of this issue, even if it needs a separate LISP for your issue.

Posted

Lots of extra codes in that link  to work around some of the problems as well. Maybe LeeMac's code will work for OP.

 

If OP can't post the text, not much specific can be done IMHO.

  • Like 1
Posted

"I am pretty sure John Uhden is still around." Sure is alive and kicking over at forums/autodesk. I will send a message to him asking to look at this post.

Posted

I used Lee Mac's Unformat String, this one works. It does need some workaround when I use it on dimensions to not remove diameter symbols but that was an easy fix.

  • Like 1
Posted

There is a version 5.0d around, further down the page where you linked in your other post, it seems to address the  issue.

 

 v5.0d  ??cadffm??
;;;;  Revised regular expression for Height format - 
;;;;  e.g. for format like this:  H0.400000

 

Also, John Uhden has an Unformat LISP he mentions in the same thread, that might do what you need.

 

Please post your amended code if you don't mind, others may find it helpful.

  • Like 1
Posted

For versions newer than 2021 you need to set the system variable LISPSYS to zero (LISPSYS=0) and restart AutoCAD for this and other older code I still use to function correctly.

https://www.theswamp.org/index.php?topic=31584.msg608557#msg608557

He talked about a v5.0d version coming soon but I've never found it anywhere. He may have gotten frustrated when the code he put so much time into no longer worked as expected with AutoCAD's default settings.

Posted
2 hours ago, tombu said:

 

He talked about a v5.0d version coming soon but I've never found it anywhere. He may have gotten frustrated when the code he put so much time into no longer worked as expected with AutoCAD's default settings.

cadffm created a version d, it was posted in a thread on Autodesk Forum, OP posted a link to it in their other thread. HERE

 

stripmtext-v5-0 Lisp Routine - Autodesk Community - AutoCAD

 

 

  • Thanks 1
Posted

John Uhden responded

 

Anyway, StripMtext was the invention of Joe Burke and Steve Doman.  My contribution was very small and used only for the earliest releases.

  • 4 months later...
Posted

Snippet from the code:

 

(defun Height (str)
      ;; revised 6/6/2010
      ;(RE:Replace "" "\\\\H[0-9]?[.]?[0-9]+x;" str)
      (RE:Replace "" "\\\\H[0-9]*?[.]?[0-9]*?(x|X)+;" str)
    )

 

Just try it with the extra | character, so it becomes this:

(defun Height (str)
      ;; revised 6/6/2010
      ;(RE:Replace "" "\\\\H[0-9]?[.]?[0-9]+x;" str)
      (RE:Replace "" "\\\\H[0-9]*?[.]?[0-9]*?(|x|X)+;" str) ; <--- Put an extra | character before x
    )

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...