Blog-NikoG

Cityweft data into editable Revit elements

Building the site context is a foundational step in architectural design. It depends on data for buildings, terrain, roads, and rivers. Tools like OpenStreetMap (OSM) and Cityweft help speed up this stage, giving architects the essential objects they need to begin. But OSM data has its gaps: no 3D geometry, roads available only as lines, and not all buildings include height information. Cityweft fills these missing pieces by providing volumetric geometry in formats suitable for Revit, such as OBJ.

In this article, I break down a practical approach to converting Cityweft’s OBJ exports into editable Revit system elements - topo surfaces, floors, and solid building objects - using Dynamo and the MeshToolkit package. The benefit of this method is straightforward: the result is real Revit elements that can be adjusted at any point if inaccuracies appear during the project.

OpenStreetMap

To extract data from OSM, go to the OSM website, locate the area you need, and click Export in the top panel. Make sure the selected region is correct, then confirm by clicking Export again.
To obtain data from OpenStreetMap (OSM), go to the website, select the area you need, and click Export on the top panel, making sure the region is chosen correctly. The exported file is saved as .osm. This format can be used to bring the data into Revit through Dynamo with the help of specialized packages, the most common being Elk and osm2dyn. Elk is generally easier to work with because it reads information directly from a file stored on the user’s machine. osm2dyn, on the other hand, pulls data from the internet based on specified coordinates.

However, working with OSM data comes with notable limitations. The main issue is the absence of 3D information, meaning you cannot obtain any volumetric geometry directly. Roads are provided only as linework. Building data is also inconsistent: not all outlines are mapped accurately, and many buildings lack height or floor-count information. Another factor to keep in mind is that OSM delivers everything in a single file, split into categories that may be inaccurately assigned by contributors, which is not always convenient for project work.

Сityweft

This resource addresses the shortcomings of OSM by providing volumetric geometry in multiple formats that can later be used in Revit.

To obtain data from CITYWEFT, go to the CITYWEFT website, sign in to your account, and create a new project.
Select the area you need on the map, enable topography generation in the settings, and click Generate.
Once the selected area has been generated, you can export everything as a single file or export each layer separately, depending on the purpose of the final model.

To control what gets included, use the sidebar to turn individual layers on or off as needed.
After selecting only the elements you want to export on the right panel, click Export. You can then choose the format that fits your workflow.

Available export formats:

  • Rhino (versions 7 and 8)
  • OBJ
  • GLB
  • DXF
  • STL
  • DAE
  • PLY
  • GLTF
Most of these formats can be linked into Revit directly as CAD references. But if the goal is to create actual Revit elements rather than load the geometry as a link, you can either use the Rhino plugin for Revit or bring the data into Revit through Dynamo.

Dynamo

For the method described below, the elements were exported from Cityweft in OBJ format. Essentially, this file contains vertex data, faces, normals, and texture coordinates of the 3D geometry.

To bring this data into Dynamo, we use the MeshToolkit package, which can read Mesh objects directly from the exported files. Three separate scripts were created to generate topography, planar elements based on surfaces, and building solids, each using its own method.

Topography

Building the topo surface turned out to be the simplest task among all elements needed by architects. With MeshToolkit, we can extract point data directly from the imported topographic mesh and use those points to generate a native Revit topo surface. As a result, the OBJ file is converted into a fully editable topo surface that looks like this:

Creating planar elements

To bring planar elements into Revit, point data alone is not enough - the boundaries matter. For site plans and 3D views, architects typically prefer using floors, so the goal is to extract clean boundary curves from the OBJ mesh. In Dynamo, this can be achieved with MeshToolkit by slicing the mesh with several parallel planes. For better accuracy, it’s best to use two plane sets in two different directions. The result is a series of polylines created by cutting through the mesh.

By taking the outermost points of these polylines, we isolate the points that lie directly on the boundaries of the planar elements. Once these points are grouped in the correct order, they form contour lines that can be used to generate Revit floors with the required outlines. This method allows you to add elements such as rivers, asphalt areas, construction zones, green spaces, and more.
The advantage of these scripts is that they generate native Revit system elements - topo surfaces and floors - that designers can adjust on their own whenever they identify inaccuracies in the geometry produced by the scripts.

Building the buildings

The most challenging part of generating elements through Dynamo is constructing the buildings. To convert buildings from OBJ format, we rely on the same package used in the previous scripts, but this time we take the mesh, break it down into individual faces, and group those faces to isolate each building from the overall mesh.

Once the faces are grouped, we merge them into PolySurfaces. If gaps appear, we close them to ensure each PolySurface becomes a watertight volume. From there, we generate Solid elements that can be placed directly in Revit.
Here is an example of how the script works in Dynamo. As you can see, the OBJ file provides a point cloud that is then converted into a native Revit topo surface. This approach allows you to continue working directly in Revit while relying on terrain data that remains as accurate as possible.

Conclusion

Using Cityweft together with Dynamo and the MeshToolkit package gives architects an efficient way to generate editable Revit system elements - topo surfaces, floors, and solid building objects - while overcoming the limitations of OpenStreetMap (OSM). This provides access to high-quality 3D context that is ready for AEC workflows and significantly speeds up the creation of the project environment at the early design stage.

The key benefit of this method is straightforward: designers gain full control over the resulting Revit elements. If any inaccuracies appear, they can be adjusted directly with Revit’s native tools, without rebuilding the geometry from scratch.
In a future post, I’ll walk through how to achieve even higher quality geometry for site context using a direct workflow built on the Cityweft Plugin together with Rhino and Grasshopper. We’ll look at how the plugin provides access to rich metadata and editable NURBS-based topography directly inside Rhino, and how this precise geometry can then be transferred into Revit, potentially via Rhino.Inside, to generate native system elements.

But that’s a topic for the next article.

Some Links:

Cityweft - It is a platform that provides instant access to high-quality 3D terrain and context models delivered as clean, fully editable geometry.

OpenStreetMap (OSM) - It is a resource that provides basic context - buildings, topography, rivers, and roads - but its major drawback is the absence of 3D data, and roads can be obtained only as linework.

Dynamo - A tool used to convert Cityweft (OBJ) or OSM data into editable Revit system elements such as topo surfaces, floors, and solid objects.

MeshToolkit - A Dynamo package used to read mesh data from Cityweft OBJ files, enabling the creation of full Revit topo surfaces and other geometry.

Plugin Cityweft for Rhino & Grasshopper - It provides access to Cityweft’s global data directly inside Rhino and Grasshopper, allowing you to work with rich metadata and editable NURBS-based topography.

Elk и osm2dyn - These are popular Dynamo packages used to bring OSM data into Revit, with Elk being more convenient since it works directly with local files.
2025-12-08 12:26 BIM Revit Architecture