Find location of section heads on sheet

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to get the location of section heads on a sheet viewport. However, I'm finding it difficult to even find the section head elements themselves using a FilteredElementCollector. I've resorted to running a FilteredElementCollector to collect all elements from the view, and then grouping them by category. In the results, I don't see ANY reference to section heads.
Here's my C# code:
var counts = new Dictionary<String, int>(); var collector = new FilteredElementCollector(document, view.Id) foreach (var element in collector) { if (element.Category == null) { continue; } if (!counts.ContainsKey(element.Category.Name)) { counts[element.Category.Name] = 0; } counts[element.Category.Name] += 1; }
The collector is able to find a View element corresponding to the Section that's referenced from this view, but I can't figure out how to use that to find the location of the section head.
I'm relatively new to the Revit API, but I've put in a few hours of research on this topic and can't figure out where to even start. From reading through documentation on categories, I should be looking for elements of type BuiltInCategory.OST_SectionHeads (and if I'm not, then what on earth is this category for?!), but again I see no hint of elements of this type on this view. No elements of this category appear when running RevitLookup's "Snoop DB" command.
Finally, I'd like to repeat this process for elevation and callout markers. If that process is significantly different, any info on it would be appreciated.