Jump to content
Sign in to follow this  
mbft

Select objects by surface area

Recommended Posts

I would like to create a custom tool/script that would allow me to select polygons within a certain surface range. for example : all polygons between 200 and 300m2. I am looking at urban cadastral data and plot areas.

Even more ambitious would be to automatically color code different parcel areas : 200-300=red, 301-400=blue, 401-500=green, etc

thank you all for any help, guidance, suggestions.

m

  • Like 1

Share this post


Link to post

I'm pretty bad at this but I can get you started with a simple script.

This script will select all polygons, polylines, and rectangles greater than 200 m2 and less than 300 m2.

DSelectAll; SelectObj(INSYMBOL & INVIEWPORT & ((T=POLY)|(T=RECT)|(T=POLYLINE)) & (Area > 200) & (Area < 300));

If you don't want to look inside of symbols or viewports you can delete "INSYMBOL & INVIEWPORT &"

I believe this script will select polygons, polylines, and rectangles on layers other than the active layer, but color changes in the fill won't affect objects on other layers unless the layer option is set to Show/Snap/Modify Others.

hth

MK

  • Like 1

Share this post


Link to post

Make it a foreachobject instead. There you can pass parameters with criteria similar to the above. Just leave the area comparions out of it.

In the loop you can decide the color for each one based on the area you can retrieve with the handle to each object.

Instead of just coloring them, you could also assign them classes. this way it would be easier to control the looks of everything.

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