Renumber Viewports with Dynamo

Since I have been doing a lot more documentation work in Revit these days, I have become significantly more interested in how Dynamo can automate certain documentation tasks. One task that can always drive me crazy (especially in Revit) is renumbering viewports on sheets.

There are several different ways you can renumber viewports. I decided to use a simple ‘pick’ method so I wouldn’t have to do any reordering in Dynamo. This method works well with a smaller number of views, though it might be worth using a slightly more complex method if you have sheets full of details that need to be renumbered.

If you’re interested in that, I would check out Nate Holland’s AU2015 presentation (Practical Design Computation) and additional class material (with .dyn files). He demonstrates a method where he renumbers views based on a letter/number grid. Since the AU presentation wasn’t recorded, he also posted a screencast video.

sheet_grid

But when I was trying to get this simpler method to work, I was having some issues setting the Detail Number parameter. The standard Dynamo node, Element.SetParameterByName, was producing very unreliable results when I tried to set the Detail Number.

Even with a fairly small set of views, the node would fail with at least one of the viewports. So after searching around, I took a look at Nate’s example and found that he was using Archi-lab’s BuiltIn Parameter nodes. These nodes are critical to making this definition work.

This definition also uses several nodes from Clockwork and Spring Nodes. Here it is:

renumber_def

The first node, Springs.SelectElements(ordered), allows you to pick the viewports in the order that you want them to be re-numbered. The Rhythm package also has a similar node with a slightly more Revit-y interface.

Because Revit does not allow two viewports to have the same Detail Number, the definition also requires a two-step process. First, you have to set the Detail Numbers to a temporary/placeholder character. I used letter characters to do this. Then set the final Detail Numbers.

It is very quick and quite satisfying to see it work. Here is the result in the basic sample project:

sheet_02.PNG

Advertisements

5 thoughts on “Renumber Viewports with Dynamo

  1. Where is the PassThrough Node located? Can’t seem to find it in the Clockwork package. Thank you!

    • Archi-lab, Clockwork, and Spring Nodes are all packages with their own custom nodes. You can install them in Dynamo by going to Packages, Search for a Package… Archi-lab shows up as ‘archi-lab.net’. The two archi-lab nodes are ‘Get Built In Parameter’ and ‘Set BuiltIn Parameter’.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s