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:
Problem Mtext color is not changing by Auto lisp???
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Problem Mtext color is not changing by Auto lisp??? (Read 1576 times)
0 Members and 1 Guest are viewing this topic.
Hrishikesh
Guest
Problem Mtext color is not changing by Auto lisp???
«
on:
July 13, 2017, 10:47:06 AM »
Hi All,
I am facing a small problem regarding changing color of mtext.
If the mtext color is set from mtext editor, Autolisp is not changing color of that particular mtext.
Can anybody help me on this issue?
Screenshot & Lisp is attached.
Code - Auto/Visual Lisp:
[Select]
(
vl-load-com
)
(
defun
C:Change_Mtext_Color
(
/
en
)
(
setq
en
(
car
(
entsel
"
\n
Select Mtext"
)
)
)
(
setq
en
(
vlax
-
ename
->
vla-object
en
)
)
(
if
(
=
"AcDbMText"
(
vla-get-objectname
en
)
)
(
vla-put-color
en
2
)
)
;_ end of if
)
;_ end of defun
(
defun
C:Change_Mtext_Color1
(
/
en
)
(
setq
en
(
car
(
entsel
"
\n
Select Mtext"
)
)
)
(
setq
elist
(
entget
en
)
)
(
setq
elist
(
subst
(
cons
62
2
)
(
assoc
62
elist
)
elist
)
)
(
entmod
elist
)
(
entupd
en
)
)
;_ end of defun
Logged
ronjonp
Needs a day job
Posts: 7531
Re: Problem Mtext color is not changing by Auto lisp???
«
Reply #1 on:
July 13, 2017, 11:13:56 AM »
Do a search for 'stripmtext'.
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
CAB
Global Moderator
Seagull
Posts: 10401
Re: Problem Mtext color is not changing by Auto lisp???
«
Reply #2 on:
July 13, 2017, 01:21:07 PM »
Got my trusty index handy.
-------------- Strip MText ----------------
https://www.theswamp.org/index.php?topic=31584.0
https://www.theswamp.org/index.php?topic=17185.0
https://www.theswamp.org/index.php?topic=14764.0
Logged
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.
Hrishikesh
Guest
Re: Problem Mtext color is not changing by Auto lisp???
«
Reply #3 on:
July 13, 2017, 02:39:57 PM »
Hey Thanks!!!
This not only solve my problem but it' other options will help me a lot in my daily work also.
Now I have a powerful weapon to deal with "MTEXT"
Thanks Again...
-Hrishikesh
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Problem Mtext color is not changing by Auto lisp???