The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 AutoCAD
 Lisp & Other Handy Files
 Mtext font Style
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

n/a
deleted

3 Posts

Posted - February 20 2004 :  12:01:10 PM  Show Profile  Visit n/a's Homepage  Reply with Quote
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



651 Posts

Posted - February 20 2004 :  4:24:17 PM  Show Profile  Visit Admin's Homepage  Reply with Quote
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
Go to Top of Page

n/a
deleted

3 Posts

Posted - February 23 2004 :  05:33:29 AM  Show Profile  Visit n/a's Homepage  Reply with Quote
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
Go to Top of Page

Admin
Administrator



651 Posts

Posted - February 23 2004 :  4:52:15 PM  Show Profile  Visit Admin's Homepage  Reply with Quote
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
Go to Top of Page

anthenson
New Member

United Kingdom
11 Posts

Posted - June 26 2006 :  04:41:27 AM  Show Profile  Visit anthenson's Homepage  Reply with Quote
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?
Go to Top of Page

Admin
Administrator



651 Posts

Posted - June 26 2006 :  9:40:47 PM  Show Profile  Visit Admin's Homepage  Reply with Quote
Hi anthenson,

It's hard to say why something isn't working. Have you tried REGEN or similar?

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
Go to Top of Page

anthenson
New Member

United Kingdom
11 Posts

Posted - June 27 2006 :  06:00:23 AM  Show Profile  Visit anthenson's Homepage  Reply with Quote
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
Go to Top of Page

Admin
Administrator



651 Posts

Posted - June 27 2006 :  08:13:04 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
Ah... I think I understand...

Does this help?

http://www.archidigm.com/lounge/autocad%20tips/Mtext_Map.htm

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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.37 seconds. Snitz Forums 2000