CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Czech English Deutsch
Login/Register:
 Visitors: 2832 
RSS tips RSS channel - CAD tips
RSS discussion RSS channel - CAD discussion

Discussion Discussion forum

HelpCAD discussion

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

The information that you provide in this form will make up your forum profile which can be viewed by other forum members. Your email address will only be visible by forum admin and moderators and will be used to send you Forum Notifications. To cancel your account, use the page Opt-out or contact webmaster@cadforum.cz.

Change shx text type?

 Post Reply Post Reply
Author
kentral View Drop Down
Newbie
Newbie


Joined: 22.May.2018
Location: Spain
Using: autocad 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote kentral Quote  Post ReplyReply Direct Link To This Post Topic: Change shx text type?
    Posted: 11.Dec.2019 at 11:02
Hi.
I need to change several text styles with diferents shx names (romas.shx, txt.shx, etc) to an unic ttf name (arial.ttf).
Ther is any lisp to do this.
Thank you
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7068
Post Options Post Options   Thanks (0) Thanks(0)   Quote John Connor Quote  Post ReplyReply Direct Link To This Post Posted: 11.Dec.2019 at 13:00
Individually or as a group?
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2019
Status: Offline
Points: 523
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post Posted: 11.Dec.2019 at 22:06
This replaces the font in all Style definitions that use any .shx fonts with Arial.ttf, if that's what you want:

(defun C:SHXtoArial (/ sty stydata)
  (while (setq sty (tblnext "style" (not sty))); step through Style table
    (if (wcmatch (cdr (assoc 3 sty)) "*.shx"); Style uses an .shx font
      (progn ; then -- replace that with arial.ttf
        (setq stydata (entget (tblobjname "style" (cdr (assoc 2 sty)))))
        (entmod (subst '(3 . "arial.ttf") (assoc 3 stydata) stydata))
      )
    )
  )
  (princ)
)

It could be modified to apply to a list of specific Style names instead, or those of only selected Text/Mtext objects, or in other ways.


Edited by Kent Cooper - 12.Dec.2019 at 16:18
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,078 seconds.