Hi guys, i am trying to select tree blocks within a disturbance area, add an X block on top of the tree block and finally create an spreadsheet with the trees to be removed. I have a close polyline create in cad which i am able to select and create a polygon geometry in Dynamo.I am having trouble filtering the tree blocks. I am using the All Objects of Type to filter the selection to select all blocks only but how can i just create a selection of only the tree blocks.
Try this.GetBlockRefsByNameInBndBox.dyn (22.6 KB)
Thank you Keith the script is pointing me to the right direction. I am having an anomaly with the bounding box. It is selecting a block that is outside the boundary. I was also trying by selecting the object in the layer and then creating the geometry from the object and the result was also wrong, just one item got selected. I am not sure was the problem.
Assuming your polygon is planar. Use Polygon.ContainmentTest node to see if the point is inside or outside the polygon. Above example bounding box what @keith.sowinski showed works for 4 side polygon.
@csanchez Since you have polycurve you can create polygon by exploding polycurve or use custom node from springs package called Polygon.ContainmentTest+. It has ability to consider both polycurve and polygon.
Thank you Kulkul the solution works very well.