Hello Everyone!!!!
I'm facing a small issue in Filtering Family Instances within the Room. Few families not get filtered, for example
Non-Solid families are get excluded. Can anybody help me how to filter intersected 2D families also?
Reference Image!!!
This my Code!!!
//Get Family Instance
public List<FamilyInstance> GetFamilyInstance(Document revitDoc, Room room)
{
//Get Closed Shell
GeometryElement geoEle = room.ClosedShell;
GeometryObject geoObject = null;
//Get Geometry Object From Geometry Element
foreach (GeometryObject obj in geoEle)
{
if (obj is Solid)
{
geoObject = obj;
}
}
ElementIntersectsSolidFilter elementIntersectsSolidFilter = new ElementIntersectsSolidFilter(geoObject as Solid);
return new FilteredElementCollector(revitDoc)
.OfClass(typeof(FamilyInstance))
.WhereElementIsNotElementType().
WherePasses(elementIntersectsSolidFilter).
Cast<FamilyInstance>().
ToList();
}
@jeremytammik @naveen.kumar.t @RPTHOMAS108 @jeremy_tammik @ricaun
Thanks & Regards,
Mohamed Arshad K
Mohamed Arshad K
Solved! Go to Solution.
Link copied