cairo9 Posted November 29, 2004 Share Posted November 29, 2004 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 Quote Link to comment
MullinRJ Posted November 29, 2004 Share Posted November 29, 2004 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 Quote Link to comment
MullinRJ Posted November 29, 2004 Share Posted November 29, 2004 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 Quote Link to comment
jan15 Posted November 29, 2004 Share Posted November 29, 2004 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. Quote Link to comment
cairo9 Posted December 1, 2004 Author Share Posted December 1, 2004 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. Quote Link to comment
Jonathan Pickup Posted December 1, 2004 Share Posted December 1, 2004 when you choose the custom selestion you can choose the option to create script. VectorWorks will createsome of the script for you! Quote Link to comment
cairo9 Posted December 1, 2004 Author Share Posted December 1, 2004 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... Quote Link to comment
MullinRJ Posted December 2, 2004 Share Posted December 2, 2004 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 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.