Hi folks,
I'm an architectural researcher (not an architect), who's having some trouble figuring out how to write a small program. On some AutoCad stuff, I'm fairly knowledgeable, but since I'm self-taught, there are bound to be some holes in my knowledge, so no advice is too dumb.
I have a number of floorplans that I need to analyze using a program called DepthMap (it's basically a visual analysis program). This program can output data into a text file, and I have created a awk (Linux-based) program that turns the data into an AutoCad script. When run, this script "draws" the data from the DepthMap program on a new layer in the AutoCad model. Each data point is in the form of a three dimensional rectangle, where x and y give the x and y locations, and the thickness represents data from the DepthMap program. Each datapoint is colored with a particular algorithm--I've given an example below.
color 180
_rectang thickness 3.18203 0,15 0.99,15.99
I tend to have a lot of these little data points (typically >30,000). What I would like to do is to be able to draw an region on a separate layer (ideally a polygon), and then create an AutoCad program that would automatically select all of the datapoints that fall within that region. Then I would like to export properties of those datapoints to Excel (I know how to export to Excel, thankfully).
The reason I'd like to draw these regions on a separate layer is because sometimes, I need to go back and select the same data points for a different analysis, and I need to make sure that I got the same ones each time. Also, because some of these plans have a lot of repetitive, strangely shaped rooms, I would love to be able to draw a polygon region one time and copy/paste it, rather than trying to do a lot of tedious selection of data points by hand.
So, in short:
I have lots of small rectangles on layer A.
I have regions defined by polygons on layer B.
I want to write a script that exports the properties of every rectangle on layer A that falls within the limit of each polygon on layer B.
Any advice would be most welcome--even if it's just a reference to a function that might be useful. Thanks,
Michael