revisions on sheet w/ dynamo

image by archi-lab

image_01

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:

  1. Get all sheets that you want to add Revisions to – in my case all sheets that were going to appear on a drawing list.
  2. Get all revisions.
  3. 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.

image_02

 

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:

image_03

 

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:

image_04

 

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:

image_05

 

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:

image_06

 

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!

Xrev_Freebies-UpRev_Dialog

 

 

Support archi-lab on Patreon!

59 Comments

  1. Chris says:

    Cool. But there’s already a free Revit API tool that does this and has been around a couple of years… Xrev Uprev

    • Chris,

      Great tip. I updated the post to make users aware of that tool. I did some quick google search on you and Xrev and it appears that you are the man behind those tools. For that I thank you twice-fold. I appreciate your role in the BIM Community and how passionate you are about sharing your knowledge and tools. Thanks again, and keep up the good work!

  2. Tiago says:

    Hi Konrad

    This is very interesting. Thanks for sharing.
    Is there a way to get the getAllRevisions.py to read the open file again every time the dynamo script runs? I am asking more out of curiosity than need I must say.

    • This is more of an issue with Dynamo and how it tries to not re-run every bit of code to save time. It only re-runs nodes that input data has changed for them. Those python nodes don’t re-run automatically so the best you can do is delete it, and place a new one. Its a little annoying. I am sorry.

  3. Daniel says:

    Hey Konrad,
    i’ve been looking for a way to find all sheets associated with a specific revision. When i use the Revisions on Sheet i get this:
    File “‘, line 46, in
    AttributeError: ‘NoneType’ object has no attribute “getAdditionalRevisionIds’

    Running Revit 2016 and Dynamo 0.8.2
    Any help is of course much appreciated :)

    • It seems to me that you are somehow managed to get a Null value into your list of sheets. Can you check that? Images or sample files are helpful when posting a question since I can’t see your computer from this far away. Good luck!

  4. Xrev works on RVT 2016, I love it.
    but your nodes are a great extra, I love the printing and renaming solution you shared.
    much appreciated, and it will save brain and physical/clicking time to many.
    jm

  5. quick question
    how would you get the sheet set/list of all the sheets with a specific revision?

    jm

    • Jean-Marc,

      You can simply run a check using List.ContainsItem and use the resulting Boolean Mask with List.FilterByBoolMask node to filter sheets that have a given Revision. Please see attached. Please pay attention to lacing setting on the List.ContainsItem node.

      Attachment:  Capture-3.png

  6. Nick says:

    Hi Konrad,

    These are great nodes and something I’ve been after for a while. I’ve built a definition around them that ties into a master excel sheet list/revision tracker we use for our projects and some other dynamo definitions. Basically my definition will read an “X” from my sheet list for a particular issue/revision and check the box, or read an “-” and skip that sheet.

    One limitation I found was if some sheets are removed from the issue I still have to manually uncheck the box. I think what I need is the inverse of your SetRevisionsOnSheet node so I can have it uncheck the revision on sheet box. I do not know Python/RevitAPI enough to change your code so I’m hoping this is something you could provide.

    Thanks!

  7. Luke says:

    Thanks for those nodes Konrad. I have updated my post with the new Xrev Freebies Uprev download links. It works on all versions up to current 2016. http://whatrevitwants.blogspot.com.au/2014/04/quickly-apply-revision-to-many-sheets.html

  8. Masha says:

    Great material! Thank you for sharing these resources Konrad!
    Xrev is a great utility when you need to hand-pick from the many sheets in your set. Attached is an example Dynamo definition that filters based on Sheet parameter…
    There are also some Revision management capabilities with Newforma that are helpful in the context of Document Control.

    p.s.
    would be fantastic to have ‘Like’ feature for blog posts\comments:)

  9. https://github.com/rabiadhikari/Scripting/blob/master/RevisionsOnSheet.dyn

    In the link above click “RAW” View and save the file as “*.dyn”. This is another dynamo for Revisions on Sheets.

  10. Rebecca says:

    Thanks for the package and the article, Konrad! I just downloaded the latest version of this package to play around with, but I am having trouble with the Revisions on Sheet node.

    I am using a test revit file that I set up with 3 revisions. Right now I have one sheet with Revision 1, one with Revision 2, one with Revision 3, and one with Rev. 2 and 3. However, I am just getting a lot of empty lists and two instances of ONE of the revisions. Any idea what’s going on?

    Using Revit 2015, Dynamo 0.9

    Attachment:  Capture1.png

  11. Cesar says:

    Unfortunately, Im in the same boat with Rebecca. Brand new file. Created sheets and put Revision Cloud 1 and 2. But in my case, all are with empty list.

    Using Revit 2016, Dynamo 0.8.2.2392, archi-lab 2015.11.12

    Attachment:  Capture11.png

  12. Roman Sevostianov says:

    Hello Konrad,

    Playing around with this, trying to get it to work, almost there. I keep getting an AttributeError, please see attached. Sorry, I have no programming experience, so the error message means nothing to me.
    Full error message(doesn’t fit in the watch node):
    Traceback (most recent call last):
    File “”, line 55, in
    AttributeError: ‘str’ object has no attribute ‘Id’

    Using Revit 2015, Dynamo 0.9.0, Archi-lab 2015.11.12

    Thank you in advance.

    Attachment:  Capture-1.png

  13. Mark Dorling says:

    Hi Konrad,

    Thanks for all the work you have put into these nodes and how to’s!

    I am trying Use your nodes to build an Excel document transmittal. This spreadsheet needs to be a matrix showing revision history by date. I think need to get the Revision number/letter of each revision sequence placed on each sheet, build a list and write to excel.

    I have tried and failed to edit your Revisions Properties node (my first time using python, with no previous programming experience) to include the Revision Number parameter with no success.

    Any tips or ideas you may be able to offer would be greatly appreciated.

    Thanks in advance!

    Mark

  14. Jesper Wallaert says:

    Hi Konrad
    Is your Revisions on Sheet Node only capable of grabbing the highligted Seq. in the Revisions on Sheet in the UI (the ones you manually set) ?. I hope the picture make my point a little more clear.

    Best Ragards
    Jesper

    • I am not sure what the question is. Image doesn’t make it clearer. Are there other revisions that it should be capable of extracting? Can you demonstrate?

    • Jesper Wallaert says:

      Hi Konrad
      Sometimes the Node works and give me all the revisions added to the Sheet and sometimes it will not include the revision defined by the revisions clouds.
      The red markup in the picture is the revision I added throw the Sheet properties (green color) the Blue revision comes from a Revision Cloud. As you see the revision is not included in the output.

      I can see that other people have the same Issue in the chat. I’ll try reinstall the package and maybe update dynamo to a newer version to see if that solves my periodic issue.

      /Jesper

      • Jasper,

        Now, I get it. I am a little slow sometimes. Yes, I think that is expected behavior based on code that I have used. I will, re-visit the node and report back if it can be fixed. Thanks a lot for posting.

        • Jesper Wallaert says:

          I’m glad I could help, I hope you’ll succeed.
          /Jesper

          • I also need to be able to get revisions that were created with clouds. Before dynamo clouds were the fastest way to put revisions on a sheet. I need to include those if I want this to work with our existing projects.

            You can fix this behavior to by editing one line in the python script.

            On line 46 you’ll see this line:

            revIds.append(list(i.GetAdditionalRevisionIds()))

            change it to this:

            revIds.append(list(i.GetAllRevisionIds()))

            Changing “GetAdditionalRevisionIds” to GetAllRevisionIds” will fix the problem.

          • Thanks for sharing

  15. Jabari Garland says:

    I’m looking for the “Remove Revisions” Node. I’ve downloaded the archi-lab package but don’t see it in my Library. I’ve also tried to search for the package name to no avail. I’m using Revit 2014 and Dynamo version 0.8.2. Could that be the reason?

    • Yes, archi-lab was never tested on Revit 2014. I think that first version of Revit that I tested on was Revit 2015 and its currently on Revit 2017. Please get the latest and it should not be an issue.

      • Jabari Garland says:

        Thanks Konrad! It looks like the 2015.8.29 version archi-lab only works with Dynamo 0.8.2. Unfortunately, we’re not upgrading anytime soon.

  16. Ben Robinson says:

    Hi Konrad,

    This is a really useful tutorial and has saved my team a lot of time! The only thing i am missing is how to only add revisions to a filtered drawing list.

    Currently i have a drawing list that for example filters out all drawings that are with the 24 Series_Stair folder, as well as individual drawings that would bot be issued. When i run your script as these sheets are scheduled but filters out the script still adds a revision number to the sheets. Is there a way to only add revisions to only the drawings in the filtered list?

    Many thanks

    Ben

  17. Ian says:

    Hi,

    Is there a way to extract the “current revision” from the drawing sheet in Dynamo? This is the alphanumeric value the revision dialogue produces for inclusion on the drawing sheet.

    Kind regards,

    Ian.

  18. Thom K. says:

    Thank you for this page I have found it very helpful.

    I hope this is not answered elsewhere, but all I want to do is create an Excel file with the sheet number, name, and all of the revisions that appear in the revision schedule on each sheet.

    I have managed to get the output as separate lists that I can write to separate CSV files. I have not been able to combine the lists out to a single file or even to a single list.

    Thank you again!

    Attachment:  List_Output.png

    • What you have already, you can write to Excel or CSV. Have you tried feeding that list into Write to Excel node from Bumblebee or even the built in Dynamo node?

      • Thom K says:

        Thanks for the response: I have written them to separate CSVs but I was hoping to combine them into one list in Dynamo and then out to Excel.

        Thats the part I can’t get: How to combine the lists into one list.

        Thanks again!

  19. Ian says:

    Hi.

    I take it there is no way to extract the “current revision” from the drawing sheet in Dynamo? Otherwise someone would have posted how to do it, right?

    Kind regards,

    Ian.

  20. andrew says:

    Hello,

    I downloaded the archilab package but do not see the node ‘revisions on sheet’. I have the dynamo 1.3.2 and revit 2017. Any idea on why I am not finding it?

  21. kv1 says:

    Hello Konrad,

    Using Dynamo 1.2/Revit 2015 here. I see the Sheet.Revisions node after installing your “archi-lab.net” package, but I do not see the Revision Properties node to access details about each revision.

    Thanks so much for your time.

  22. Chau says:

    thank you for sharing

  23. Ron Shvartsman says:

    Konrad,

    Thanks for sharing this. I had a user test out XREV. They liked it, but what they didn’t like was having to select all the sheets from the previous revision, along with the sheets for the new revision, every time they used. User told me there was no way to save it as a setting (not all projects require the previous revision with new one, but some do).

    So we came up with a process for that. The user creates a print set. The print set determines which sheets need to have a specific revision applied. Next go around all they have to do is add the new sheets for the next revision and save as a new print set. Archi-Lab nodes helped a lot with this, from getting the print set, the views on print set and everything else from the above post.

    Though I would share this in case it’s useful. Also, open to how something like that could have been done better.

  24. Dejan Mojic says:

    Hi Konrad, thanks for sharing your knowledge on the topic. Would it be possible to get a ‘Revisions on Sheet’ code sample, as others provided above? Thank you.

  25. Charlie Padgett says:

    Hey Konrad,

    Thanks for the very helpful info/nodes for tackling revisions in Dynamo. I seem to be getting an error when trying to create a revision when using the “Revisions.Create” node. It says: “Warning: Revisions.Create operation failed.
    A managed exception was thrown by Revit or by one of its external applications.”

    Do you know what could be causing this? I have attached an image below:

    Also having issues with the create node sometimes creating a revision that already exists (same ID #).

    Thanks for your time,

    Charlie

Leave a Comment