Overview: This workflow allows the user to source .OSM files from www.openstreetmap.org, form a polygon from the building points, extrude them and turn them into individual families within Revit.
Packages: ‘Elk’, ‘Landform’ and ‘SpringNodes’.
Dynamo Script: Download from Dropbox
Step 1: Getting your .OSM file
Go to www.openstreetmap.org and zoom to your location. Make sure that the bounding box includes all the buildings that you’d like to mass. Select ‘Export’, and choose your source. The normal export function usually works fine but the website offers a number of options.
NOTE: Generally, the larger your bounding box, and the more content contained within it, the longer your Dynamo script takes to run. In most cases, it runs quite quickly and smoothly. I have also come across .OSM files missing the building data which it should contain and displayed on the website. Zooming your bounding box in or out a little and re-exporting your .OSM file often resolves this issue.
Step 2: Open Revit, Dynamo and your .DYN script
Open a new or existing Revit project, I often use a new project to test and then link if needed. From within Revit, open Dynamo and open the .DYN script.
Step 3: Inserting the required information
Use the ‘File Path’ node to select your .OSM file. In the ‘Extrude Buildings’ group, you can use the code blocks to set your maximum and minimum extrude heights. In the ‘Create Families from Building Extrusions’ group, I have chosen to use a typical mass .RFT file but this can be changed along with the family category.
Now you can select ‘Run’!
Step 4: Back to Revit
Back in Revit if you go to a 3D view, or any view, the Dynamo geometry should be visible.
Next go to the ‘Massing & Site’ tab, and select ‘Show Mass’.
Your building masses should now appear in Revit as individual families, and if you go to your Project Browser, Families and Mass they should now appear there too.
You can now close Dynamo, we’re done!
Credit to Timothy Logan for his ‘Elk’ nodes and video tutorials!