Jump to content

custom selection


Recommended Posts

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

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

Link to comment

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.

Link to comment

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.

Link to comment

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

Link to comment

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

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