Jump to content
Sign in to follow this  
MaxStudio

SelectObj Appendix?

Recommended Posts

If I want to use SelectObj to select a font I can use the following:

SelectObj(FOT='name of the font');

If I want to use SelectObj to select a line weight I can use the following:

SelectObj(LW=4);

I've gotten this information from posting in the forums.

My question, is there an appendix or some place I can go online to understand the criteria? Why is it 'FOT' for font? why is it 'LW' for line weight?

Thanks

Derek

Share this post


Link to post

btw i'm trying to to select a specific font but I only want to select the font if it has bold checked. Is that possible?

Share this post


Link to post
My question, is there an appendix or some place I can go online to understand the criteria? Why is it 'FOT' for font? why is it 'LW' for line weight?

The Vectorscript Appendix is what you need Look at Appendix E Miscellaneous Selectors.

In VW2012 it is located at:

file:///Applications/Vectorworks%202012/VWHelp/VectorScript%20Reference/Appendix/Appendix.html

It should be somewhere similar in VW2008.

Why are they named what they are? The original programmers preference.

Share this post


Link to post
btw i'm trying to to select a specific font but I only want to select the font if it has bold checked. Is that possible?

Using the standard selectors, your only options for fonts are font (FOT) and font size (FSZ).

If you really need to select by Bold, I would use ForEachObject with a either the specific font or all text in general as the criteria. The callback procedure would then check to see if the font is bold and select it if it is.

Share this post


Link to post
If you really need to select by Bold, I would use ForEachObject with a either the specific font or all text in general as the criteria. The callback procedure would then check to see if the font is bold and select it if it is.

But how would I script that?

ForEachObj(font, ?????)?

i'm not sure how to correctly script the criteria....

Share this post


Link to post
Procedure Test;
{Demo to show the use of ForEachObject to select text that is bold}
{To change this to only handle a certain font change the criteria}
{in the ForEachObject command to T=Text to something like}
{((FOT='Arial'))}

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

Procedure CallBack(H1:Handle);
Begin
if (GetTextStyle(H1,1)=1) then SetSelect(H1);
End;

Begin
DSelectAll;
ForEachObject(CallBack,((T=TEXT)));
End;

Run(Test);

Share this post


Link to post

The VectorScript Language Guide, which is available through the help system explains criteria in more detail.

Also, as you are learning, try the Custom Selection menu item, and choose the create script option. You can then edit the script. Also, in the script editor, you can select criteria through a pull down menu system via the menu at the top-left of the editor window.

-Josh

Share this post


Link to post

But how would I script that?

ForEachObj(font, ?????)?

i'm not sure how to correctly script the criteria....

Why don't you use the "Criteria" menu in the script editor to build the string? This is the same dialog used for building the selection criteria.

Most likely, most of us old scripters use an external editor so we forget about this feature found in the vs editor.

Share this post


Link to post

But how would I script that?

ForEachObj(font, ?????)?

i'm not sure how to correctly script the criteria....

Why don't you use the "Criteria" menu in the script editor to build the string? This is the same dialog used for building the selection criteria.

Most likely, most of us old scripters use an external editor so we forget about this feature found in the vs editor.

I use TextWrangler. I'm using VW2008 is this feature in this version of the script editor?

Share this post


Link to post

I use TextWrangler. I'm using VW2008 is this feature in this version of the script editor?

TextWrangler is an external editor. I am referring to the vectorscript editor and this menu is available in all vw versions since criteria procedures were introduced in the late 1990's.

Share this post


Link to post

Thanks Pat it worked exactly as I needed it to.

I'm switching from not using Quartz Imaging to using Quartz Imaging and it is messing with some of my fonts. This is going to make it a lot easier for me to fix some of my older drawings.

I appreciate it.

Derek

Share this post


Link to post

Miguel,

I found it! I'm so use to working in the external editor because eveything is color coded and I found it to be easier. The criteria menu is definitely going to be useful in the future.

Thanks

Derek

Share this post


Link to post

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

Sign in to follow this  

 

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.

×
×
  • Create New...