Jump to content
Sign in to follow this  
cairo9

custom selection

Recommended Posts

1. How can I do custom selection for objects whose line weight is anything between 6-12 excepting them. I am unable to do it.

2. can I do custom selection with more than one rule, say can I choose all the rectangle which have black fill and line thickness 6.

Please advise [Cool]

Share this post


Link to post

Hi Cairo,

Try using this in a short script:

code:

DSelectAll; SelectObj((LW>6) & (LW<12));[/code][/indent]

I used the Custom Selection menu to select a LW of 6 and had it save to a script. Then I edited the script to add the second term and changed the '=' to '>' and '<' in the two terms and the values to 6 and 12 respectively.

The '&' character means AND. The '|' character means OR. So the statement reads:

Deselect everything. Then Select all objects that meet the criteria: LW>6 mils AND LW<12 mils. If you want an inclusive range, use:

code:

DSelectAll; SelectObj((LW>=6) & (LW<=12));[/code][/indent]

Raymond

Share this post


Link to post

Answer to question 2, YES. With Custom Selection open, click the More Choices button (twice) and set your criteria for selection. Line Weight = 6, Type = Rectangle, Fill Back Color = (choose the black color from the color palette). Click the OK button. If it doesn't work, try the Fill Fore Color, but solid fills are almost always background fills unless you set them to foreground either manually or by script.

Raymond

Share this post


Link to post

Answer to question 1:

Custom Selection can only select one of the 5 default lineweights that are shown on your Attributes palette.

To be able to Custom Select a different line weight, say 17 mils, you have to change one of those 5 defaults to 17 mils. That's done with a pull-down menu command called Set Attribute Defaults.

Share this post


Link to post

Hi,

the script concept looks great and I feel by writing script I can save a lot of my effort.

But I am quite new to vectorworks, can you please tell me where should I write the script.

I mean how should I do the selection script so that I can click that Icon and do the selection everytime.

Share this post


Link to post

Hey archoncad,

YA it works great, I mean the script window..

Does the script window only create scripts, with custom selection or I can make something else also...say for example,to be simple whenever I click this script the object selected before that woud move by 6" etc . I mean if I can do it , it would be wonderful. If yws How do I get it there...

Share this post


Link to post

Cairo,

You have taken the first step on a long and interesting journey. Yes, the script window can hold scripts that do a wide variety of tasks, even move an object 6". Scripts can be very simple (1 line) or very complex (thousands of lines). Most scripts that you will find useful on an everyday basis will be short, and you can learn to write them yourself, either by example or self taught. I recommend "by example" for a faster, less frustrating initial experience.

You will need two documents from the NNA site:

the VectorScript 11 Function Reference, and the VectorScript Language Guide. They can be found at: www.nemetschek.net/support/custom/vscript/docs.html. There are some good examples you can look at there, too. Also, check out VectorDepot at: www.VectorDepot.com. There are a LOT of good examples there, and most are at a very reasonable price - FREE.

New script objects can be created from the Resource Browser window by clicking on the button with the arrow to the right of the word "Resources". You can also copy and paste scripts from one document to another via the clipboard.

Welcome to VectorScripting,

Raymond

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