//假设元素为ee
BoundingBoxXYZ box = ee.get_BoundingBox(doc.ActiveView);
//创建outline,通过boundingboxintersect过滤器
Outline myOutLn = new Outline(box.Min, box.Max);
BoundingBoxIntersectsFilter boxee = new BoundingBoxIntersectsFilter(myOutLn);
FilteredElementCollector collector = new FilteredElementCollector(doc);
//过滤出相交元素,假设用到的是板类型
IList<Element> elements = collector.OfClass(typeof(Floor)).WherePasses(boxee).ToElements();