mbft Posted February 2, 2015 Share Posted February 2, 2015 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 1 Quote Link to comment
michaelk Posted February 3, 2015 Share Posted February 3, 2015 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 1 Quote Link to comment
Hippocode Posted February 3, 2015 Share Posted February 3, 2015 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. 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.