Community
Hi all,
I trying to collect all the structural foundation slab by filtered element collector, How to give Is foundation slab = true in below code.
foreach (Element myfil in new FilteredElementCollector(doc, doc.ActiveView.Id).OfClass(typeof(FloorType)) .OfCategory(BuiltInCategory.OST_StructuralFoundation)
scren shot is attached for more clarity.
Thanks In advance.
Regards
Padhu
I would suggest you go with LINQ
FilteredElementCollector coll = new FilteredElementCollector(doc, doc.ActiveView.Id).OfClass(typeof(FloorType)).OfCategory(BuiltInCategory.OST_StructuralFoundation); var collFoundationSlab = from FloorType ft in coll where ft.IsFoundationSlab == true select ft; foreach (Element myfil in collFoundationSlab) { }
Padhu,
The Class for Foundation slabs is CeilingandFloor and not FloorType. I had a similar issue trying to collect the foundation slabs and lead me to that. Hope this helps!