Kevin K Posted August 7, 2016 Share Posted August 7, 2016 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. Quote Link to comment
Jim Smith Posted August 8, 2016 Share Posted August 8, 2016 - Could this be a Class or Layer issue in the Custom Selection criteria ? - Could the font size actually have two or three decimals that mess up the Custom Selection? Quote Link to comment
MullinRJ Posted August 9, 2016 Share Posted August 9, 2016 Kevin, I was going to post here earlier today and suggest you use a two line script: DSelectAll; 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. } CONST DefaultLo = '9'; DefaultHi = '11'; VAR Lower, Upper: Real; Procedure SelectIt(H :Handle); Var PtSize :Real; Begin PtSize := GetTextSize(H, 0); if (PtSize >= Lower) & (PtSize <= Upper) then SetSelect(H); End; { SelectIt } BEGIN DSelectAll; 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 } Run(SelectPtSizeRange); HTH, Raymond Quote Link to comment
Kevin K Posted August 11, 2016 Author Share Posted August 11, 2016 Ray Can't thank you enough for the script. Worked like a charm!! If you find yourself in my area of Tahiti lunch is on me!!! Quote Link to comment
MullinRJ Posted August 11, 2016 Share Posted August 11, 2016 Checking my calendar... looks good, Checking my wallet... um... I seem to have more calendar than wallet available. Glad I could help. And if I ever get kidnapped and wake up in Moorea, I'll make sure my captors bring me over for lunch. TIA, Raymond Quote Link to comment
Recommended Posts
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.