CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
New CADforum look launched.
Over 1.087.000 registered users (EN+CZ). Try the new Engineering calculator, the CAD conversion wizard, the Color converter and USD viewer. Learn about twiGIS.
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

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.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
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

Topic ClosedChange 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
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: 7175
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: AutoCAD2020, 2023
Status: Offline
Points: 683
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,336 seconds.