Scheduling schedules?

just copy/paste this code into a new c# module and place " using System.Text; "  up at the top with the other "usings". When the dialog box pops up do a ctrl-c (copy to clipboard) and paste into excel.

public void schedsched()         {             //place " using System.Text; "  up at the top with the other "usings" to get the StringBuilder to work             UIDocument UiDoc = this.ActiveUIDocument;             Document Doc = UiDoc.Document;             StringBuilder sb = new StringBuilder();             ElementCategoryFilter sheetcf = new ElementCategoryFilter(BuiltInCategory.OST_Sheets);             FilteredElementCollector sheetCollector = new FilteredElementCollector(Doc);             IList<Element> sheetlist = sheetCollector.WherePasses(sheetcf).WhereElementIsNotElementType().ToElements();             foreach(Element sheet in sheetlist)             {                 ElementCategoryFilter panelcf = new ElementCategoryFilter(BuiltInCategory.OST_PanelScheduleGraphics);                 FilteredElementCollector panelCollector = new FilteredElementCollector(Doc, sheet.Id);                 IList<Element> panellist = panelCollector.WherePasses(panelcf).WhereElementIsNotElementType().ToElements();                    foreach(Element panel in panellist)                    {                        sb.AppendLine(panel.Name+" \t"+sheet.get_Parameter(BuiltInParameter.SHEET_NUMBER).AsString());                    }                 }             TaskDialog.Show("Revit", sb.ToString());         }

/r/Revit Thread Parent