Hello,
I have four structural walls in my project but given code showing zero. Where am I making mistake? However if I replace OST_Walls with OST_StructuralColumns, it works perfectly. Also from where can I get description of all members of BuiltInCategory enum? Revit Api docs just provide members without details.
public void Trial1() { Document doc = this.ActiveUIDocument.Document; string info = String.Empty; int a=0; foreach (Element e in new FilteredElementCollector(doc)
.OfClass(typeof(FamilyInstance))
.OfCategory(BuiltInCategory.OST_Walls)) { a++; } TaskDialog.Show("Count",a.ToString()); }
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Solved by MarryTookMyCoffe. Go to Solution.
If you look for walls you write ofclass(Wall) not a familyInstance.
Try this, install revit look up and see there what object is which class.
Thanks to MarryTookMyCoffe for the helpful answer. This is the link to download and install RevitLookup:
Can't find what you're looking for? Ask the community or share your knowledge.