One of the tasks a BIM manager has is to manage view creation at the beginning of a project. I believe this task is most challenging on the Mechanical Electrical and Plumbing side. Consider the following multi-disciplinary project view structure.
Clearly, there is multiple floor plan view types and these need to be created for each level (think skyscraper). Doing this manually is a chore. Clearly for a BIM consultant wanting to set up templates for multiple companies in rapid response to an Employers Information Requirement (EIR) is crucial. Well, that is why we have Dynamo and Python, isn’t it?
What happens when one is subject to a Lead Designer who does not specify the same discipline codes for the project as what one has in one’s template. Is one now required to change floor plan view type names manually? I figured not, so I started investigating the automation thereof using Dynamo and Python. Clearly, the Revit API is needed.
In the image below, the FamilyViewType class does not expose a “Create” method, but there does exist a “Duplicate” method. In other words, even though the object does expose types, one is not allowed to create them, but only duplicate.
The following thread on the net discusses this topic:
Using Dynamo nodes, one may expose the FamilyViewTypes within the template (just make sure they are present – I had to create the Gross and Rentable Area plans within the base template to get at them all) as follows:
In Python this can be done in code:
One may output to a text file in order to copy and paste the values into Excel spreadsheets without human error.
These are the “base” ViewFamilyTypes in Revit
Here I include the “base” ViewFamilyTypes in an excel spreadsheet for the creation of Floor Plan View Types.
These are then duplicated as required:
Clearly, some error trapping still needs to be done, but the Python script works well enough for myself, as I understand how to use it in conjunction with my spreadsheet.
In the following weeks, I am going to delve deeper into creating custom templates using an Excel Spreadsheet, Dynamo and Python. Happy Coding!