Revit Dynamo - Generate checklist(sheets) based on existing sheets - example 27

0. Intro

In our example 27, the task at hand, we want to generate checklists (the checklists are sheets) based on existing sheets.  That means, for every drawing created in the project, a corresponding checklist is needed. A quite tedious job if you have 100 drawings on the project. But do not despair, Dynamo is here to save the day! 

This example will be a good exercise for list management and list filter. 


Picture 0
Picture 1

1. Find sheets in the project 

To generate sheets based on existing sheets we need to find all sheets on our project. The node Categories and All Elements of Category are used.  As you can see, all the sheets in our projects are listed. 

Picture 2

3.Exclude sheets

Some of the sheets listed we do not desire to generate a checklist for, like the rebar schedule sheet(as seen in picture 2). Must therefore exclude that sheet from our list. 

For easy excluding, a list created from sheet number, and not sheet name is desirable. Element.GetParameterValueByName is used to get all the sheet numbers from our sheets listed.

Further the List.Filter node with a condition from the String.Contains node will filter out all the sheet numbers containing Rebar schedule in the out alternative. 

When importing elements into Dynamo, it contains a lot of parameters and every parameter in that specific element holds some sort of information.  This information can be listed, sorted, and manipulated. In our case, we imported all the sheet elements into Dynamo, from there we listed the value from the parameter named Sheet number, and filter out what sheet numbers value we didn’t want to continue with.

Picture 3

2.Exclude and combine

Start of this section by listing all values from the parameter Tittel_3 in our sheet elements, this parameter is a shared parameter created in the titleblock family(see how here) If there is a blank value it is filtered out using List.FilterByBoolMask

List.Combine combines the two parameters (Sheet number and Tittel_3) previously found to one line(string) in the list, separate the two parameters with a hyphen using the node String.Concat.

4 and 5.Filter A and B sheets 

Again we want to filter, this time from our newly created list from section 2.Exclude and combine. The filter criteria are A and B, separating all the strings containing A  in one list, and B in another. The reason for the separation is the string containing A will get a different checklist than the string containing B. As you will see in the next section. 

To shorten this script we could drop the hole 4.Filter A sheets, because, as you can see, the in value from the node List.Filter is the same as the out value from the node List.Filter in section 5.Filter B sheets.  

Picture 4

6 and 7.Create checklists 

At this point, we are ready to create the checklists, the node Sheet.ByNameNumberTitleBlock is used. The input value here is sheetName, found in the previous section. Sheet number, generated by code blocks and a string, titleBlockFamilyType, that’s our titleblock, different titleblock for checklist A and checklist B. 

The last task we want to accomplish is to separate the checklist A and B in different Sub-Category. The Sub-Category is a parameter in the sheet element and at this point it’s blank. The node Element.SetParameterBy.Name is used to fill the value in the parameter with the name checklist A and Checklist B, and as shown in the video, the respective checklists fall into the correct Sub-Category. 

Picture 5