Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API Object Read Only

0 REPLIES 0
Reply
Message 1 of 1
desantis15
271 Views, 0 Replies

API Object Read Only

 

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..

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community