Dynamo with Revit Topography


For a given x and y coordinate, can I use Dynamo to extract the z-coordinate from a Topo in Revit? I have a rather large list of x, y data points for which I would need the corresponding z-coordinates.

Any suggestions or ideas?



1 Like


Yes this is possible I was presenting a similar workflow at recent RTC NA in Washington, DC. The way that I solved that was to extract topo into Dynamo and then using Mantis Shrimp send it to Grasshopper where I intersected all of the points with it and send back my new intersection points to Dynamo so I can place Trees on top of topography rather than floating in space. Is that what you are looking for?

Send me an email at ksobon1986 [at] gmail [dot] com and i will forward you some sample files.


Of course I can also imagine that we can use Revit API and ability to do geometry intersection, but its extra work. :slight_smile:

  1. Convert the Revit topography to a Polysurface.

  2. Project points with the required XY coordinates from a base plane on to the polysurface to get the corresponding Z coordinates.

File: TopoPointProject.dyn




Created a node for a Poly surface approximation of Revit topography.

Node File: PolySurfaceFromTopography.dyf

Also available in the package Testing Waters

The same definition as earlier, but with nodes…


For this to work the node will have to downloaded through the Package Manager or the above .dyf file be copied to C:\Users<username>\AppData\Roaming\Dynamo.8\definitions


I have shown some practical examples of this here: http://jbdynamo.blogspot.no/2014/11/last-post-about-topos-and-piles-forever.html

I’ve also got a package out on the package manager called Topography.Surface which does exactly what Vikrams do. I guess I’ll deprecate it, since I’m very much for a condensation of packages.

Mind you however that the reason Konrad is going via grasshopper is that he can then skip the surface conversion of the mesh which is a very heavy operation.

Thanks, everyone! My apologies for this very late reply. (I thought I would receive an email about posts). There are a lot of great ideas here. I will investigate and see if I can solve the issue.

Thanks again!!


Thanks, Vikram! This worked for what I needed.


Much appreciated.

Hi all,


Reviving this thread to try to get some troubleshooting help. I’m currently working on something similar the the OP’s script in v 0.9.2, and running into a series of issues, which I think stem from my Topography.ToPolySurface. The node seems to not be converting ALL of the topo into polysurfaces, just some of it (see screenshots below). The missing pieces mean a lot of my points are coming up null for intersections that shouldn’t be.


I’ve tried doing the topo conversion both through the “Select Model Element” node and also through the “Element Types” taking in all topography surfaces in the model (see screenshot below for parallel scripts). What is super-weird is that both of them are giving me a single point as the result, but that the points are in different locations.

Any idea why this might be happening or how to fix my topo conversion issue?

Many much thanks.

Realized the point-project node was looking for a single base geometry (and I was feeding it a list) so it was just looking at the first entry on the list. Joined the surfaces into a single polysurface and solved the second issue…first question still stands, though.

From which package did you get the Topography to Polysurface node? There are a few, but it probably shouldn’t matter that much.

On a side note:
As mentioned before, converting to polysurfaces is a heavy job. It would be interesting if someone with the programming skills could have a look at something like this: http://thebuildingcoder.typepad.com/blog/2010/11/ray-tracing-to-place-family-instance.html to see if it’s possible and if it would take less time to raytrace and find the intersection point in Revit itself rather than converting it to dynamo geometry. (Probably not…) It seems like the OOTB raytracer node doesn’t recognize topos as is.


Got the Topography.ToPolySurface node from Spring Nodes (not the .py node version, which didn’t seem to work on my fail-fast smaller version of the larger dataset). The node worked beautifully on the smaller dataset, where the topo was tiny; maybe I just need to break the topo into smaller pieces, since it’s such a heavy process?