Jump to content

Custom selection of font sizes with decimal numbers

Recommended Posts

Not sure if I am in the correct forum for this, but I often import DWG files where the person uses a custom font size....like 8.8 instead of just using 8 or 9 pt sizes.

In attempting to do a custom selection to select all fonts of that size so I can globally change the size to something from planet earth without the decimal sizes, i was not successful using the typical criteria to facilitate what I wish to do.

I imagine there is a script master out there who could perhaps point me in the right direction?

Thanks in advance.

Link to comment


   I was going to post here earlier today and suggest you use a two line script:


SelectObj ( (FSZ >= 11) & (FSZ <= 12) );

but when I tried it I realized FSZ is broken, actually it never really worked. FSZ only works with integer point sizes. So I entered a bug report and reworked an old script of mine that should work for you.

Try this:

PROCEDURE SelectPtSizeRange;
{ Select all text objects in a range of point sizes. }
{ 25 Nov 2003 - Raymond J Mullin }
{ 08 Aug 2016 - Rewrite with ForEachObject. }
DefaultLo = '9';
DefaultHi = '11';
Lower, Upper: Real;

Procedure SelectIt(H :Handle);
	PtSize :Real;
	PtSize := GetTextSize(H, 0);
	if (PtSize >= Lower) & (PtSize <= Upper) then 
End;		{ SelectIt }

PtDialog('Select Text Between Point Sizes: X=Lower & Y=Upper', DefaultLo, DefaultHi, Lower, Upper);
if not DidCancel then
	ForEachObject(SelectIt, InSymbol & (T=Text));
END;		{ SelectPtSizeRange }



Link to comment

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.

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...