Jump to content
Pat Stanford

Change All Fonts in File

Recommended Posts

The attached script will change the font of all text objects in a drawing, even objects that are part of a group, symbol or viewport annoation. A dialog box allows the user to select the desired font.

Depending on how a PluginObject has been written it might or might not be able to change the font of text that is part of a PIO.

Free for your use.

BACKUP your file before use. No Warranty is Expressed or Implied. Do not operate heavy machinery while using this script. If a rash or sneezing develops for more than 4 hours consult a doctor immediately.

Procedure ChangeAllFonts;

{Changes the font of all text on a drawing to the selected font}
{Traverses into groups, symbols and viewport annotations}

{January 6, 2012}
{? 2012, Coviana, Inc - Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

var	Hd		:Handle;
Font	:String;
dInt	:Integer;
dReal	:Real;

Procedure ChangeFont(Hd:Handle);

if GetType(Hd)= 10 then 
	SetTextFont(Hd, 0,len(gettext(Hd)),GetFontID(Font));

ForEachObject(ChangeFont,(INSYMBOL & INOBJECT & INVIEWPORT & (ALL)));


Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.