Jump to content
Developer Wiki and Function Reference Links ×

SelectObj Appendix?


MaxStudio

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

Link to comment
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.

Link to comment
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.

Link to comment
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....

Link to comment
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);

Link to comment

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

Link to comment

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.

Link to comment

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?

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.

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.

×
×
  • Create New...