Get all section in specific view (structural plan)

i try to get all section element in view .
is it possible?

What do you mean?

All 3D Elements or 2D Elements?



I mean all “Sections” in view…


Here is my workflow for getting all the views that have a sectionline in the active view:

  • Get all elements of category in view, category = views.
  • String from object, get all items with the String “Element”, these are the sectionlines. (Yes thats really the only way i know to identify sectionlines)
  • Element Parameter, get view name.
  • List all views in project and get the views by their name.

I tried and it doesn’t work.

I´m sorry, first step in my workflow is selecting section lines manually.
It was just a guess that selecting all elements in view will give you the sectionlines, but they don´t.

The All Elements in Active View node is also no help…


Some python to help :slight_smile:

import clr
import System

import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

views = FilteredElementCollector(doc, doc.ActiveView.Id).OfCategory(BuiltInCategory.OST_Viewers).ToElements()
OUT =  views

That worked well!


i success getting the “Section” (maybe it the symbol itself but not the view)

how do I get the view/view id from the section?

I thought about 2 workflows but I’m feeling there is a better one and I missing something:

  1. I found that the view id number is +1 from the section id number. (i don’t know if it was a coincidence)
  2. get section name and then look for all view lists by the same name


1 Like

Thats the way to go, like I´m doing it in one of the above screenshots.

Because this won`t work without a python code so i would recommend to use a code that gets the sectionlines and also gives you the views as output.

Find the code by @Hyunu_Kim here:

Very interesting in this “new” OST Category I just learned.

what is “Viewers” ??

In one of my projects OST_Viewers collects 2486 Elements representing 2486 views: