public static Category GetCategoryStairsStringerCarriage(Document doc)
{
FilteredElementCollector coll = new FilteredElementCollector(doc).WhereElementIsElementType();
// значение параметра true означает, что нужно выбрать все элементы ,
// за исключением типа, указанного в первом параметре.
ElementClassFilter filterInv = new ElementClassFilter(typeof(FamilySymbol), true);
IEnumerable<ElementType> collElemsTypes = coll.WherePasses(filterInv).OfType<ElementType>();
var fColl = collElemsTypes.Where(l => l.Category != null && l.Category.Id.IntegerValue == (int)BuiltInCategory.OST_StairsStringerCarriage).FirstOrDefault();
if (fColl != null)
return fColl.Category;
else
return null;
}