BoundingBoxXYZ xyzLocation
= SelectedView.get_BoundingBox(
m_Doc.ActiveView );
// get the outline max and min
XYZ ptMaxOutline = new XYZ(
CorrespondingView.Outline.Max.U,
CorrespondingView.Outline.Max.V,
0 );
// get the view's origin point's
// coordinates in current view sheet.
UV ptSourceViewOriginInSheet = new UV(
xyzLocation.Max.X - ptMaxOutline.X,
xyzLocation.Max.Y - ptMaxOutline.Y );
IEnumerable<ViewSheet> AllSheets = new FilteredElementCollector(doc)
.OfClass(typeof(ViewSheet))
.OfCategory(BuiltInCategory.OST_Sheets)
.Cast<ViewSheet>();