Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
StripFontFormat
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: StripFontFormat (Read 1679 times)
0 Members and 1 Guest are viewing this topic.
jbuzbee
Swamp Rat
Posts: 851
StripFontFormat
«
on:
February 26, 2020, 11:35:41 AM »
Does anyone have a routine that will strip the font formating in Mtext?
I've lost mine
and don't have time to re-right it. Even a road map would be helpful
Thanks for any info!
Logged
James Buzbee
Windows 8
Slim©
Needs a day job
Posts: 6566
The Dude Abides...
Re: StripFontFormat
«
Reply #1 on:
February 26, 2020, 12:03:38 PM »
http://www.theswamp.org/index.php?topic=31584.0
Logged
I drink beer and I know things....
Lee Mac
Seagull
Posts: 12906
London, England
WWW
Re: StripFontFormat
«
Reply #2 on:
February 26, 2020, 02:32:56 PM »
Here's
a lightweight program to strip all formatting (you can't pick & choose as you can with StripMText).
Logged
Lee Mac Programming
•
Twitter
•
Exchange App Store
jbuzbee
Swamp Rat
Posts: 851
Re: StripFontFormat
«
Reply #3 on:
February 27, 2020, 12:18:44 PM »
Thanks Lee
Logged
James Buzbee
Windows 8
ahsattarian
Newt
Posts: 112
Re: StripFontFormat
«
Reply #4 on:
November 22, 2020, 02:47:30 PM »
check these :
Code - Auto/Visual Lisp:
[Select]
(
defun
c:mtxstrip1
(
)
(
setq
ss
(
ssget
'
(
(
0
.
"mtext,dimension,multileader"
)
)
)
)
(
setq
n
(
sslength
ss
)
)
(
setq
k
-
1
)
(
repeat
n
(
setq
k
(
1+
k
)
)
(
setq
s
(
ssname
ss k
)
)
(
setq
en
(
entget
s
)
)
(
setq
typ
(
strcase
(
cdr
(
assoc
0
en
)
)
t
)
)
(
setq
ass
1
)
(
cond
(
(
=
typ
"multileader"
)
(
setq
ass
304
)
)
)
(
setq
txt1
(
cdr
(
assoc
ass en
)
)
)
(
setq
txt2
""
)
(
setq
i
1
)
(
setq
len
(
strlen
txt1
)
)
(
while
(
<=
i len
)
(
setq
let
(
substr
txt1 i
1
)
)
(
if
(
=
let
"
\\
"
)
(
progn
(
setq
i
(
1+
i
)
)
(
setq
let
(
substr
txt1 i
1
)
)
(
if
(
or
(
=
let
"{"
)
(
=
let
"}"
)
(
=
let
"
\\
"
)
(
=
let
"P"
)
)
(
setq
txt2
(
strcat
txt2
"
\\
"
let
)
)
(
while
(
and
(
/=
let
";"
)
(
<=
i len
)
)
(
setq
i
(
1+
i
)
)
(
setq
let
(
substr
txt1 i
1
)
)
)
)
)
(
cond
(
(
and
(
/=
let
"{"
)
(
/=
let
"}"
)
)
(
setq
txt2
(
strcat
txt2 let
)
)
)
)
)
(
setq
i
(
1+
i
)
)
)
(
cond
(
(
/=
txt1 txt2
)
(
setq
en
(
subst
(
cons
ass txt2
)
(
assoc
ass en
)
en
)
)
(
entmod
en
)
)
)
)
)
Code - Auto/Visual Lisp:
[Select]
(
defun
c:mtxstrip2
(
)
(
setq
ss
(
ssget
'
(
(
0
.
"MTEXT"
)
)
)
)
(
setq
n
(
sslength
ss
)
)
(
setq
k
-
1
)
(
repeat
n
(
setq
k
(
1+
k
)
)
(
setq
s
(
ssname
ss k
)
)
(
setq
obj
(
vlax
-
ename
->
vla-object
s
)
)
(
setq
text
(
vla-get-textstring
obj
)
)
(
setq
len
(
strlen
text
)
)
(
setq
i
0
)
(
setq
libad '
(
123
125
92
59
)
)
(
setq
text2
""
)
(
setq
bad
0
)
(
repeat
len
(
setq
i
(
1+
i
)
)
(
setq
let
(
substr
text i
1
)
)
(
setq
asci
(
ascii
let
)
)
(
cond
(
(
=
asci
92
)
(
setq
bad
1
)
)
)
(
cond
(
(
and
(
=
asci
59
)
(
=
bad
1
)
)
(
setq
bad
0
)
)
)
(
cond
(
(
and
(
not
(
member
asci libad
)
)
(
=
bad
0
)
)
(
setq
text2
(
strcat
text2 let
)
)
)
)
(
if
(
and
(
=
let
"
\\
"
)
(
setq
let2
(
substr
text
(
1+
i
)
1
)
)
(
=
let2
"P"
)
)
(
progn
(
setq
text2
(
strcat
text2 let let2
)
)
(
setq
bad
0
)
(
setq
i
(
1+
i
)
)
)
)
)
(
vla-put-textstring
obj text2
)
)
)
EDIT (John): Added code tags.
«
Last Edit: December 10, 2020, 03:24:14 PM by John Kaul (Se7en)
»
Logged
roy_043
Water Moccasin
Posts: 1895
BricsCAD 18
Re: StripFontFormat
«
Reply #5 on:
November 22, 2020, 03:18:58 PM »
@ahsattarian:
Can you please use code tags? Thanks.
You can either use the Code dropdown list and select AutoLisp, or use the '#' button.
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
StripFontFormat