Assign viewport type according to view scale value

Seems like it would be a simple task with dynamo, but this is proving elusive to me. I’ve created a viewport type for each scale factor of viewport because I am using graphic bar scales. Currently we’re changing each viewport type manually so it matches the scale factor of the view. This is not good from a QC standpoint and prone to user error. I want to create a dynamo graph to

  1. Select all placed viewports (and/or views?) in my project and
  2. Compare the viewport “type name” to the view’s “Scale Value 1:” of the view.

I think I can manage step 1, but since viewport types, viewports, and views are 3 different things, I’m not sure how to list or compare the properties of one vs the other.

I’ve seen posts on how to select and change viewport types, but some of the nodes are outdated at this point, and the solutions are not looking at the view’s “Scale Value__1:”

What have you tried so far? :slight_smile: Can you show a screenshot of the graph

Based on this solution by @Konrad_K_Sobon

I’ve learned that viewport types are stored as an element in Revit, and thus have their own properties. So the ATTEMPT above is collecting viewport types, but I’m not sure how to create a corresponding list of viewports in order to compare properties.

Hi @jwinklerQ3ZUJ probably something here if i understand right

1 Like

This looks promising. Thank you! I will be trying this today.