Using Dynamo to model a town with a shape file

Hello everyone!

I have to model in a simple way an entire town: I’ve seen various tutorial, but they aren’t complete for my work.

I have an entire folder with shape files (.shp), and my purpose is to “read” with dynamo one particular shape file that contains the profile of each building in the small town and other information such as the height of those.

I’ve downloaded a package, “GIS EXMAPLE infrabimgis.dyn”, but I don’t know how can I manage it to do want is my purpose.

With dynamo, I’d like to read the profile and extrude through the eight of each building, all info that are contained in the shape file.

How can I extrapolate those informations, and model all the buildings (as masses) in a fast way?

1 Like

Try working this out on your own first and let us know what issues you run into.

I think there are even a few similar topics on the forum already.

2 Likes

I search in the forum, but there are other procedures, with different files.

So, I try in two different ways, but I’m not able to use the shp.file.

I attach the two methods.

First one:

and second method

I’m not too familiar with shape files. Could you post your file so anyone can test it out?

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)?
Thanks

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: https://drive.google.com/drive/folders/0B4m0a57kBcYja1pGX2p3WDdLcHc?usp=sharing

1 Like

I was wondering if there was additional information shared with the graph but here it is: http://infrabim.blogspot.fr/2016/01/gis-into-revit-using-dynamo.html
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.

2 Likes

@magafra

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

1 Like

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”

Hi,

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

image

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

@magafra

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

Andrew

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: