Find "primary View" for Level


#1

I need to figure out which View becomes active when you double-click on a Level
Or, if you’re a right-click person, which View becomes active when you select a Level, right-click and pick “Go to Floor Plan”
I need to find this because we name our Levels differently than we name the Views that belong to each Level
For example, a Level named FIRST LEVEL would have Views named
01-Floor, 01-Existing, 01-Furniture, etc.
I can’t rely on translating the name (FIRST) into a number (01) because they named differently (GROUND or MAIN), but if I could find the “primary”, I can parse that View’s name.


#2

You mean the associated level?

In this example I renamed my floorplan (original) “begane grond” to “editted” … Revit asks me rename corresponding views: no.

The associated level keeps its original name.


#3

Yes, I know I can go from the View to get the name.
But I’m starting from the Level element, and I want to get to the Associated View


#4

Found it!
The Clockwork node Level.Views gives me what I want.
It returns all Views associated with a Level, but it also had an output called “firstView” that returns the name of the View you get with “Go To Floor Plan”


#5

Glad you found it. Currently that node just takes the view with the lowest ID as the first view (which is usually correct). In the Revit 2018 API there is now support for actually retrieving the associated view. I have an open task to modify the node accordingly. That change should make it into the next release of Clockwork.