ElementCategoryFilter filter = new ElementCategoryFilter(BuiltInCategory.OST_StructuralFoundation);
FilteredElementCollector otherfndCollector = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).WherePasses(filter);
IList<Element> otherfndlist = otherfndCollector.ToElements();
var otherfndtypeelements = from element in otherfndlist
where element.get_Parameter(BuiltInParameter.ELEM_CATEGORY_PARAM).AsValueString().Equals(otherfndname)
select element;
foreach (FamilyInstance otherfnd in otherfndtypeelements)
I am trying to filter out all foundation elements and change their workset, but my nested family (famA has famB inside) is an issue. Since its searching to change the famB parameter, but its not executing the code because its read-only. Any solutions on how this can be done by just filtering famA? It can be done manually in Revit, but I dont understand why I cannot do it through the api.
Thank you in advance..