Jump to content

Lisp for adjusting the font in entire drawing


Recommended Posts

Posted (edited)

Hi everyone,:)

 

I was looking for a way to set the entire text entities into the same font (Isocp3.shx).

the reason is... im working with Linear. (works like a plugin on Autocad platform). And this program works with the levels with different elevations. As we all know only the acad fonts can be elevated... windows based fonts (Like Arial) will be staying on "0" Z-coordinate... which will mess up my view as the text of different levels is visible in all sections...

 

I found this fantastic lisp on web and it works fantastic but there is just one problem: after saving and reopening all the text will take the original font they had... Can someone please help me we this? i greatly appreciate the time that you put into it...

 

Here is the Lisp:

 

(defun styles2one (newfont / styl)
(while (setq styl (tblnext "STYLE" (not styl)))
(setq styl (entget (tblobjname "STYLE" (cdr (assoc 2 styl)))))
(entmod (subst (cons 3 newfont) (assoc 3 styl) styl))
)
(command "_.regen")
(princ)
)

Example to change all to isocop3.shx:

(styles2one "isocp3.shx")

Edited by rkmcswain
added [CODE] tags
Posted

If its changing after a save then Linear must be resetting it everytime as you start. We have some software like that also, needed to go into its configuration and globally reset it to what is required. Does such a thing exist in Linear ? Else you may be able to change the individual text to a different style. Need 3 changes text mtext and blocks.

 

A non program way use filter select Text apply then Properties just change style, same for Mtext.

 

Heres a possibility http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/LISP-to-change-text-style/td-p/4697091

Posted
If its changing after a save then Linear must be resetting it everytime as you start. We have some software like that also, needed to go into its configuration and globally reset it to what is required. Does such a thing exist in Linear ? Else you may be able to change the individual text to a different style. Need 3 changes text mtext and blocks.

 

A non program way use filter select Text apply then Properties just change style, same for Mtext.

 

Heres a possibility http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/LISP-to-change-text-style/td-p/4697091

 

 

Thanks BIGAL for your response. Indeed it might be the case that a configuration adjustment would do the trick... i should run it through with our IT-manager as he has the right to adjust the global settings... let me get back to you on this...

As for changing the text styles manually ... it is very time consuming (sometimes there are more than 50 dif. styles...) and for now the last option...

 

Tnx again!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...