TreeView adding and sorting

Viewed 263

I have treeView sorted in my Autodesk Revit and I would like to show it same way in my windows form. At this time I was able to extract it just the way it looks in Revit (print log), but i cant figure out how to add it.

Here's what I've done so far:

            FilteredElementCollector schedules = new FilteredElementCollector(currDocument).
            OfClass(typeof(ViewSchedule));
        foreach (ViewSchedule schedule in schedules) {
            List<FolderItemInfo> folderfields = org.GetFolderItems(schedule.Id).ToList();
            foreach (FolderItemInfo s in folderfields) {
                print.Add(s.Name);
            }
            print.Add(schedule.Name);

enter image description here

1 Answers
Related