[Categories] -> [Section] doesn't return value

I was trying to set up an elevation and section marker seeker. When I change the Catergories node from Elevations to Sections, it returns “Empty List”. I am pretty sure there is section view in the project. I also have it tested in the Revit Sample project. The node returns “Empty List” as well. Is it a bug? If not, can someone help me with how to select all the Elevation or Section markers?

This is indeed an unusual thing. If I try to find the section by it’s ElementId and get it’s category that way it shows up as a view.

I can get the elementId of the section line/marker using the following pythonscript.
(I put this directly after the ‘All Elements of Category’ node. The script requires 2 inputs. The first one being the elements, the second one being the index of the view you want the marker of.

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
OUT = list()

input = UnwrapElement(IN[0])
if isinstance(IN[1], list):	x = IN[1]
else:	x = [IN[1]]

for i in x:
	OUT.append(input[i].GetDependentElements(None)[0])

you can then get the elements by their ElementIds

Hope this helps!

@Hali See if this ugly workaround helps


ElevationSection.dyn (21.9 KB)

1 Like

Thank you Vikram!

1 Like

If any Dynamo developer see this. Please spend some time fixing it. “Categories” is a very fundamental note for lots of scripts to begin with and “Sections” are quite common in Architectual language. Worth a glance.

navermind, I checked the Revit API, there is an “elevationmarker” but nothing under the “sectionmarker”