Clicky Web Analytics
presentation
documentation
creation
automation
bim after dark live

Monday, November 23, 2015

Practical Dynamo - Following Topography



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

(Click to enlarge...)



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, go forth, be free, and figure out what you want to follow your topography!






Comments (18)

Loading... Logging you in...
  • Logged in as
Hello, I wonder how it could make the lines that you indicate below the topography and how to make dynamo I recognize them?
2 replies · active 486 weeks ago
Julian, they are simple model lines... Under Architecture tab > Model Line
Thanks for the reply, I am very new dynamo, but how could I do for the dynamo in the part where the lines have to play in revit, you can touch the
Hi
Is there Dynamo script for Revit 2014 also?
1 reply · active 487 weeks ago
Cas, Dynamo will run on 2014... The family I made might be in 205 or 2016 but the script will work no problems in 2014... You may just have to make the family from scratch....
I get an error on your Dynamo script and it won't run:

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/...
I get another error:
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.
Hey Jeff,

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's avatar

Erkki Karjalainen · 484 weeks ago

I get to an error on your Dynamo script and it won't run:

Node: TopoToPolySurface
Error: Custom node definition is not loaded!

Whats now thanks
Todd Barrett's avatar

Todd Barrett · 479 weeks ago

If you are getting the error on the TopoToPolySurface node, just delete that node and then re-insert it back into the scheme to match this image:
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.
1 reply · active 469 weeks ago
Sorry, but TopToPolySurface doesnt exist. Did you or I missed something?
I would like to use your script as I find it very useful. But I am not able to select the model line from within the fencegenerator. It does not accept selection of any model line. Am I doing something wrong?
Thanks
1 reply · active 478 weeks ago
Hey there RevitKid !

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 ?
Could someone give a brief tutorial on how to make the "TopoToPolySurface" script? I tried but failed.
I would really appreciate an updated post and files on this.
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
Hi,
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!
Hi
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

Post a new comment

Comments by