Look at the ViewTarget, ViewHeight, ViewWidth properties for the viewport. I
think that's what you are looking for. Actually, an easier way to do this
would be to simply calculate the view rectangle for each viewport and use
that as input Editor.SelectCrossingWindow.
Albert
wrote in message news:4861198@discussion.autodesk.com...
I am trying to write a routine that will iterate though all the viewports in
a drawing and determine what blocks are contained within which viewports.
I'm not sure the best way to go about this, but here's the path that I've
started down:
1. Loop through all objects in paperspace and get all of the viewport
objects
2. Loop through all the blocks in the BlockTable
3. For each block loop through all of the BlockReference instances
4. Get the coordinates of the BlockReference and determine if it is inside
one of the viewports.
I'm having a problem with step 4 in that I'm not sure how to get the
ModelSpace coordinates of the viewports. Any ideas as to how this might be
done? Also, if anyone has any ideas of an easier way to go about this, I'm
all ears.
Thanks!
Brian