Snap an object to your topography in Revit... I dare you to! Oh, you can't?
Accurately following topography is one of those things Revit just has not evolved to yet. There are many objects you may want to follow topography: trees, pipes, fences, roads, etc...In the past, there have been a few different workarounds (one of them required exporting your topography as a DWG and the importing it so you can select edges, etc...!). Well, now that we have Dynamo accurately following topography can be as easy as a single click... really...
Dynamo Script - Construction Fence Generator
Full disclosure, I based this script off of "Enjoy Revit's" farm fence script. I tweaked it to make it a bit more stable. For example, I added the ability to select the topography element. The original script would crash and act funny when there were multiple topography elements, phases, or sub-regions. By clicking the exact topography Dynamo knows what surface to create.
You may start trying to make the script above and realize there is no "TopoToPolySurface" node in Dynamo. This is a custom node that you can make yourself... here it is:
![]() |
(Click to enlarge...) |
To use the script draw model lines that will become your path. It works best when your model lines are below the topography (see below):
Notice the green model lines below the topography. You must select these model lines first (as described in my note on the top left of the script).
Then, select the topography.
Finally, before running the script you need to have the correct family imported in your model and selected (refer to the two pull-downs of the "Family Type" nodes in the script above). This family can theoretically be any adaptive component family with two points.
Click here to download the adaptive family and Dynamo Script today...
Now, when you click run, Dynamo will place the family along your path and follow the topography. Just like this:
Now that you can place an adaptive family along a path that follows topography imagine the possibilities. I was tasked with helping coordinate some civil information (sewer, water, and utility pipes). I needed to model some of the pipes following the topography but 36" below the surface. Well, I used the same script with a new family and drew my pipes... Then moved them down 36"... DONE! Practical and efficient...
Now that you can place an adaptive family along a path that follows topography imagine the possibilities. I was tasked with helping coordinate some civil information (sewer, water, and utility pipes). I needed to model some of the pipes following the topography but 36" below the surface. Well, I used the same script with a new family and drew my pipes... Then moved them down 36"... DONE! Practical and efficient...
Now, go forth, be free, and figure out what you want to follow your topography!
Julian · 487 weeks ago
TheRevitKid 72p · 487 weeks ago
Julian · 486 weeks ago
Cas · 487 weeks ago
Is there Dynamo script for Revit 2014 also?
TheRevitKid 72p · 487 weeks ago
pumphousebim 21p · 486 weeks ago
Node: TopoToPolySurface
Error: Custom node definition is not loaded!
I'm a Dynamo newb so it could be my fault
Error screenshot: https://pumphousebim.files.wordpress.com/2015/11/...
Javier · 486 weeks ago
Node: Code Block
Error:
Advertencia: Uno o varios de los tipos de entrada no son coincidentes. No se ha podido encontrar una versión de Project que requiera argumentos de tipo (__array,_SingleFunctionObject,Autodesk.DesignScript.Geometry.Vector)
List.Error en la operación Chop.
Ben M · 485 weeks ago
I was curious if you knew of a way to enable a monolithic staircase to cut a topo without using a building pad or having to add and individually adjust points in the topo? Civil keeps updating the topo and I'm getting tired of having to waste time adjusting it every time I sync with central.
Sorry for being off-topic, but I figured I would see if you knew a way.
Thanks!
Erkki Karjalainen · 484 weeks ago
Node: TopoToPolySurface
Error: Custom node definition is not loaded!
Whats now thanks
Todd Barrett · 479 weeks ago
http://therevitkid.blogspot.com/2015/11/practical...
To do this just delete the existing TopotoPolySurface showing the error. You are now going to recreate it.
Do a search in the upper left corner of Dynamo for TopToPolySurface, select it from the list and drag it into the main screen. Now drag a connector from the Element box to the topography box and from the PolySurface box to the geom1 box on the Code Block.
Once you do that the script should run properly.
Hugo · 469 weeks ago
Ondrej · 478 weeks ago
Thanks
TheRevitKid 72p · 478 weeks ago
Yumi · 450 weeks ago
First off I just wanna say thanks for the great post !!!
Im new to Dynamo; this has made life easier !
I can´t seem to get the node : ´´Between Posts(approx)´´ ... How do I get this ?
Nicholas Preston · 419 weeks ago
Andrew · 419 weeks ago
I can't select model lines and keep receiving:
"Warning Internal error please report. Dereferencing a non-pointer"
There error shows on various nodes and starts at "Element.Curves" after the "Select Model Elements"
Using Revit 2017.2 and Dynamo 1.2.1.3083
Monica · 387 weeks ago
First of all, thanks for posting - awesome script! I am close to making it work, but I get a warning "Warning: AdaptiveComponent.ByPoints operation failed. The arguments have issues" for the first item in the list, and that piece of fence doesn't get modeled. Do you know what the cause may be?
Thanks again!
Steven · 380 weeks ago
Thanks for the post, I know you made it a while ago but I have only just discovered it. I have successfully made my custom node by following your diagram, my problem is, after replacing the topotopolysurface node and re connecting and hit run, it just crashes, I get a spinning wheel and that's it. Any help on this that would be great.
Thanks in advance