dancraig Posted March 12, 2012 Share Posted March 12, 2012 Hi there, Hope this isn't covered elsewhere. I have a model considering of ~ 6000 identical symbols. I'd like to select everything that has the same Z location. Can't seem to do this through worksheets / attributes. Any suggestions gratefully received. Dan Quote Link to comment
Christiaan Posted March 12, 2012 Share Posted March 12, 2012 Can't find anything under Tools > Custom Selection... either. Someone might be able to sort you out with a script though. Quote Link to comment
MullinRJ Posted March 12, 2012 Share Posted March 12, 2012 Hello Dan, ???Here's a very short routine that does what you are looking for. You'll have to edit the constants TopZ and BotZ to make it work for you. If you intend to use it a lot, then a dialogue can be added to allow user input from the screen. HTH, Raymond PROCEDURE xxx; { 12 Mar 2012 - R. Mullin } { Quick and dirty way to select 3D Symbols in a range of Z values. } { Only visible symbols on the current layer are affected. } CONST TopZ = 2.5; { Edit value to suit needs } BotZ = 1.0; { Edit value to suit needs } VAR H :Handle; X, Y, Z :Real; function SelectByZ(H :Handle) :Boolean; { Select 3D Symbols in the range of BotZ <= Z <= TopZ. } Begin GetSymLoc3D(H, X, Y, Z); if (GetType(H)=15) & GetObjectVariableBoo(H, 650) & (Z <= TopZ) & (Z >= BotZ) then SetSelect(H); End; { SelectByZ } BEGIN ForEachObjectInLayer(SelectByZ, 1, 0, 0); { Visible, Shallow, Current layer } END; Run(xxx); Quote Link to comment
Christiaan Posted March 12, 2012 Share Posted March 12, 2012 Dan, if you're not sure, you put this script into VW via the Resource Browser. Right-click > New Resource > Vectorscript Choose or create a Palette, choose a script name and then paste the script. Quote Link to comment
dancraig Posted March 25, 2012 Author Share Posted March 25, 2012 Thanks so much to both of you for the quick and comprehensive response and apologies that I only just came back to you. Having a good play with this now. Quote Link to comment
dancraig Posted March 25, 2012 Author Share Posted March 25, 2012 Works great, thanks again. Beyond the man pages, do you know of a good vectorscript primer? I feel a bit of language learning coming on. Quote Link to comment
MullinRJ Posted March 27, 2012 Share Posted March 27, 2012 Hi Dan, ???Inside your VW application folder is a folder called VWHelp. There is a PDF of the VS Language in the Additional Documentation sub-folder. For basic language guidance, you can also pick up any book on Pascal to get detailed instructions on structuring a program. ???Inside the other folder, VS Reference, is the VSFunctionReference.html, which has a description of most of the available VS calls. There is also an online version of the same thing at "http://developer.vectorworks.net/". It is slightly more up to date. ???One quick way to see how to draw objects w/ VS is to take a simple document and export it as VectorScript. You'll get a text file with your shapes in it. There will be a lot of header stuff you can ignore, like record format definitions and class attributes settings, but the calls to Lines, and Arcs, and Rectangles, etc. will be there. ???And, you can subscribe to the VS Mailing List, and/or peruse the two VS sections of this Board. There a re lots of gems in them. HTH, Raymond Quote Link to comment
dancraig Posted March 27, 2012 Author Share Posted March 27, 2012 Thanks Raymond, much obliged. 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.