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) if isinstance(IN, list): x = IN else: x = [IN] for i in x: OUT.append(input[i].GetDependentElements(None))
you can then get the elements by their ElementIds
Hope this helps!
Thank you Vikram！
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”