Author |
Topic |
|
n/a
deleted
3 Posts |
Posted - February 20 2004 : 12:01:10 PM
|
Hello there... Anyone know how to change the style of a group of mtext objects once the style has been "forced" from within the mtext dialogue box? i.e. although mtext object is style "romans" it appears as "Arial". Regards |
|
Admin
Administrator
652 Posts |
Posted - February 20 2004 : 4:24:17 PM
|
Hi CousinLarry,
I found this article on vbdesign.net... maybe it will answer your question. http://www.vbdesign.net/expresso/archive/topic/6535.html
I've copied the code in below that Kerry B was kind enough to post.
If this works for you, let me know!
(You'll need to save this into a .lsp file, and fill in your "NewStyle" with the actual style)
(defun c:mtsc (/ nstyle index AllMtext b1 c)
(setq nstyle "NewStyle"
index 0
)
(cond ((and (setq AllMtext (ssget "X" '((0 . "MTEXT"))))
(tblsearch "STYLE" nstyle)
)
(repeat (sslength AllMtext)
(setq b1 (entget (ssname AllMtext index))
index (1+ index)
c (assoc 7 b1)
)
(entmod (subst (cons (car c) nstyle) c b1))
)
)
(t (alert "Unable to do my job today"))
)
(princ)
)
Hope this helps! Bill |
Hurricane for AutoCAD http://www.74mph.com FAQ at http://www.74mph.com/faq/faq.html Tutorials at http://www.74mph.com/tutorials.html |
|
|
n/a
deleted
3 Posts |
Posted - February 23 2004 : 05:33:29 AM
|
Hi Bill - thanks for the response.
It worked perfectly for a test drawing I created however, not within my working drawing?!?! Have no understanding of why the drawings should be different and any further help or suggestions will be greatly appreciated.
Kind regards |
|
|
Admin
Administrator
652 Posts |
Posted - February 23 2004 : 4:52:15 PM
|
Hi CounsinLarry,
I have no idea why... would you mind sending me both your "test" drawings (bill at 74mph.com, and your "working" drawing? I might be able to offer some help... but as it stands, sorry, it should work.
I'd concentrate on what the differences are. (You can always try to cut/paste your mtext from one dwg into the other, and see if it behaves the same)
Regards, Bill |
Hurricane for AutoCAD http://www.74mph.com FAQ at http://www.74mph.com/faq/faq.html Tutorials at http://www.74mph.com/tutorials.html |
|
|
anthenson
New Member
United Kingdom
11 Posts |
Posted - June 26 2006 : 04:41:27 AM
|
Hi
I have a similar problem with a set of drawings where the MTEXT fonts have been "forced" within MTEXT itself (ie not using the default font set within the style)
I have used the .lsp pasted by Bill but all that seems to do is change all the text to whatever style I set the "newstyle" to but leaves the text font forced to the original so the problem is the same but the style has been changed.
What am I doing wrong please? |
|
|
Admin
Administrator
652 Posts |
|
anthenson
New Member
United Kingdom
11 Posts |
Posted - June 27 2006 : 06:00:23 AM
|
yes I have tried regen. After I have run the lisp routine and list teh text entities the actual style has been changed to the one I specified but the font used within the Mtext editor is still forced to the wrong one |
|
|
Admin
Administrator
652 Posts |
|
|
Topic |
|