Jump to content

Select by Z attribute


Recommended Posts

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);

Link to comment
  • 2 weeks later...

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

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