ElAmigo Posted April 22 Posted April 22 (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 April 24 by ElAmigo Quote
SLW210 Posted April 22 Posted April 22 Can you post a .dwg with the MText that's behaves this way? Quote
ElAmigo Posted April 22 Author Posted April 22 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? Quote
devitg Posted April 22 Posted April 22 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 Quote
pkenewell Posted April 22 Posted April 22 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 Quote
Steven P Posted April 22 Posted April 22 I thought Lees was unformat and stripmtext was someone elses? Could try Lee Macs Unformat.... Quote
pkenewell Posted April 22 Posted April 22 @Steven P Sorry you're correct. I was mixing up the 2 routines. Quote
SLW210 Posted April 23 Posted April 23 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. Quote
pkenewell Posted April 23 Posted April 23 @SLW210 Your comments above and the header reminded me of theSwamp "Show You Stuff" section: http://www.theswamp.org/index.php?topic=31584.0 @ElAmigo did you try downloading version 5.0c? See the link above and try it - perhaps they fixed this issue? 2 Quote
SLW210 Posted April 23 Posted April 23 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. 1 Quote
BIGAL Posted April 23 Posted April 23 "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. Quote
ElAmigo Posted April 24 Author Posted April 24 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. 1 Quote
SLW210 Posted April 24 Posted April 24 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. 1 Quote
tombu Posted April 24 Posted April 24 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. Quote
SLW210 Posted April 24 Posted April 24 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 1 Quote
BIGAL Posted April 24 Posted April 24 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. Quote
Ndruu Posted September 23 Posted September 23 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 ) Quote
Recommended Posts
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.