Section Views a node?

I’m looking for a way to retrieve all of the Section Views from the Active View, Chat GPT thinks there is a node called Section Views, but even with Monocle’s smart search I’m not finding it, does this really exist, do I need to download a package first? Is there another way that you’d recommend getting the Section Views?

@TurtleWolfe ,

i had a similar issue there

KR

Andreas

The trick here is that the View and the Viewer are different elements. The element of category ‘OST_Viewer’ is the object you interact with on the plan view, so you need to test the visibility of that object.

The crude way is to decrement the ElementId of the SectionView by 1, shown below:

the more efficient way is to get the viewers with a FilteredElementCollector

viewers = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Viewers).ToElements()
3 Likes

That is the way I have been handling it for years in Rhythm.

There is another way by toggling the crop off and on and checking for the differences:

Hi @TurtleWolfe ,

Why didn’t you search the Dynamo forums first instead of asking ChatGPT, can’t image this question hasn’t been asked before.

ChatGPT, especially in the context of Dynamo and the Revit API, simply makes up stuff out of thin air and is not reliable at all

2 Likes