You need to use the BuiltInCategory.OST_Ramps and collect the elementype using whereElementiselementType filter. bic is your builtincategory foreach ( Element elem in new FilteredElementCollector(doc) .OfCategory(bic) .WhereElementIsElementType() .Where(s => notAComponentStair(doc, s, bic) == true) .Cast() .ToList() .OrderBy(et => et.Name) ) { //Element elem = elemType as Element; dict_types.Add(elem, elem.Name); }
↧