This is one of those things that we all have to do, but very rarely actually want to. Ticking off all of the appropriate “Revisions on Sheet” for every sheet in a couple hundred drawing set can be a bit tedious. As I watched* one of my junior designers do that for few hours – because who does this when they create the sheet? – I remembered that Revit API has recently** exposed that functionality and I could pretty easily automate that. Of course I used Dynamo because what’s a better way to convince someone to learn a new tool than to show them some fancy stuff that it can do?
This definition was built in few steps:
- Get all sheets that you want to add Revisions to – in my case all sheets that were going to appear on a drawing list.
- Get all revisions.
- Apply a list of revisions to every sheet – let’s say this was our first 100% CD issuance and I want all of the revision boxes to have SD, DD, and CD shown.
Let’s get to it! Getting all sheets is relatively easy. Use “Get All Views” node from archi-lab package or simply Get All Elements of Category and then just use a “Appears in Drawing List” parameter to filter for sheets that are actually getting issued. The equivalent of “Appears in Drawing List” parameter is a BuiltInParameter called “SHEET_SCHEDULED” and since I personally much prefer using BuiltInParameter(s) to get param values – that’s what we use here. Again, “Get Built In Parameter” node can be found in archi-lab package.
Now, I am forced to do a little fancy IF statement here to convert 0’s and 1’s that “SHEET_SCHEDULED” returns to True and False which are the only arguments that List.FilterByBoolMask accepts. x==1 ? true : false; is nothing more than this:
Next up is getting all of our revisions that we want to assign to those sheets. I ended up making a custom node to get all revisions in the project:
Here’s the code for it:
And, here’s the code for Revision Properties node that allows you to extract some basic information about each revision:
Next up was just creating a list that included only those revisions that I wanted applied to all of my sheets that were getting issued. Here’s how I did that and how I went about applying them:
The little Code Block syntax: List.GetItemAtIndex(inputList, 4..7); is nothing more than saying get me items at index 4,5,6 and 7. This way I didn’t have to use multiple GetItemAtIndex nodes. Set Revisions on Sheet node is another custom node that I made for this workflow. This is how:
I also created a couple of handy Revision related nodes that would help me figure out what Revisions were on what sheets:
Of course you can find all these nodes as part of the archi-lab package now. Good luck!
* I didn’t actually watch them click on boxes for hours. I just watched them get started on that path and knew what will happen next. :-)
** Recently being sometime in 2013 :-)
Update 2015 09 17:
It was brought to my attention that there is a Revit Plugin called UpRev developed by Xrev that does exactly the same thing and is free. It can be downloaded from whatrevitwants. Unfortunately it appears that there are versions supporting Revit 2012-2014. I am not sure if there are versions for 2015/2016. Still looks like a great tool. Check it out!