Get viewtype from viewname

Is there any way to get the viewtype (floorplan, section, elevation,…) from the element or viewname? I already managed to sort them by category (1st level) because this is an actual parameter. I want the viewtype as a second level in the treeview…

The goal is to create a treeview list of the views, like in the project browser. I managed to do this for my sheets but I’m stuck with the views…

Look what your options are for a basic view (say your first floor plan) when using an Element.Parameters node.

Hey thanks for the suggestion.
I could use the parameter ‘Family and Type’.
But do you know a way to sort this alphabetically?

List.SortByKey where your list is your groups and your keys are your Unique Keys from the List.GroupByKey node.

Sorry, I don’t get it?

Never mind, figured it out! :slight_smile:

1 Like

@JacobSmall But is there also a way to sort the sublist alphabetically?

List.SortByKey would do the trick - effectively you’re going to use the same sets of nodes over and over again until you get the desired result. Just watch your list lacing and levels.

1 Like