Using Dynamo to model a town with a shape file

Wherever this file come from, it may be necessary, useful and good practice to share related links and references.
Is this what you are talking about?

I can not find the “GIS EXMAPLE infrabimgis.dyn” you are talking about. Could you please share the link (and also those to the other procedures in the forum that you mentioned)?

Hi! unfortunately the link above aren’t useful.
I share with you the .shp file (to open and explore this, you can use a free desktop app, QGis), and in particular i need the “FABBRIC.shp”.
In addition, i attached the two files of the pictures I used in the previous messages.

Here the link: i put in a Google Drive folder:

I was wondering if there was additional information shared with the graph but here it is:
You could maybe reach the author directly to check what has already been done around this work. Don’t hesitate to share what you found

Hi Francesco,

Have you tried with a different package? I’ve downloaded DynamoGIS and it seems to work.

1 Like


I have used DynamoGIS recently for something similar. In my case, there was no attribute for the height of the buildings (so I set it to a fixed/constant value) but transferred the GIS attributes into Revit parameters.

A couple of notes:

  • Shape files often have accompanying files of the same name, different extension that contain other data. In my case, there was a DBF file that contained attributes. The SHP file is just geometry
  • The units for GIS files (at least in Australia) are usually metres- so you might need some unit conversion, or set your Revit file to match

Or go directly to Github to find related documentation:

Thank you very much!

I don’t know how in my case anything works properly, although you clear explanation.

The first error: “warning: Shape. Operation GetallshapesinallRecords failed. Poly curves may not be branching”.

And then, for example to “String.tonumber”: “Warning: Operation to number failed. is not a valid number. parameter name str”


Try with one shape file at a time and eventually try to set the lacing to longest:


This is the script.

GIS EXMAPLE infrabimgis.dyn (17.9 KB)

Hi! I find the problem of all.
In one warning (before I post the errors I said), showing me this message:

Notice: Inputs are outside of the allowed modelling interval: Consider choosing the Extra Large Coon Modeling setting from 1 to 100,000,000 in the “Settings => Geometry Interval” dialogue box

So I go to settings and I modify as shown in the dialogue error. Now: I try to put as default settings and I try the different combinations of settings and all work until the interval “Large” but no more.

Now all seems work properly: now I try to use the .dbf file to try to obtain the height of each building.
For now I thank you very much!

1 Like

Oh, thanks for your answer.

I want to ask you, how can I use the .dbf file in dynamo to obtain the height of each building?
By now I put a “default” one, but I’d like to model in a proper way, using more detailed information.

Thank you again Andrew!

The building heights are store in the shape file parameters QUOTAGRONDA and QUOTABASE


In my example- I had the vector feeding into Curve.ExtrudeAsSolid fixed to z=10
You would need to feed the values from your building height field into the Z vector value

If one of the fields represents the building base, you might need to translate the shape (in Z direction) first, so it does not start from zero.

By the way, you can open DBF files in Excel if this helps to work out what is going on.

If you get stuck, send me the SHP/DBF files & I will take a look


1 Like

oh yes!

I stopped at the sight! (I see globally and my feeling was that all the masses created by dynamo should have the same height).

Thanks all for your support.

Now that I’m pretty satisfied, I’d like to “put” this “dynamo” result into a Revit file that I had created earlier: now I explain.With Revit, through the level curves I created the surface of a portion of territory. Now, I would like to place the buildings-masses made with dynamo, exactly on the previously created surface. How can I proceed?

Try our this link:

Hi all
I’m having a problem with the Shape.GetAllShapesInAllRecords node. If i try linking a relatively small shapefile i works well. On the other hand, once i load a shapefile with more information i get the same warning mentioned in previous posts.
Is there a solution to this problem?

No problem with this geometry

I get issues when i load this geometries

i already tried changing lacing and Geometry working range definition

Revit is Architectural documentation software at heart. It is NOT CIVIL PLANNING SOFTWARE.

Revit has GREAT difficulty with any geometry more than 2km from Origin. Yes, I know Autodesk tell us we can import plans with origins up to 20 miles (whatever a mile is), but that just a DWG plan with a large offset UCS. It still doesn’t support geometry that far from origin. Geometry approaching 2km from origin is likely to have all sorts of weird random issues.

Trying to model in detail something the size of what you show is going to be very difficult in Revit.

I would suggest breaking your model up into pieces by street block, and link the files rather than try to get all the geometry into one giant file.

It’s likely that these issues are causing your SHP import problems in Dynamo.

1 Like

Thanks @Adrian_Esdaile. After several attempts I found out that the issue was related to the coordinate reference system used by the shapefile. Basically, you have to use a new custom projection, which allows you to move the whole thing to somewhere near the origin. This can be done in QGIS. There were minor issues related to the model, but there was no need of breaking the model

How to create roads from an OMS file?