Generate Solids Between TIN Surfaces with Dynamo for Civil 3D

Hello @Paolo_Emilio_Serra1

I am working in the geotechnical department of a big company as CAD/BIM technician.
I got a lot of tasks regarding to generate solids between surfaces.
This year I got the opportunity to install Civil 3D 2021 + Dynamo so it feels that finally I should solve it.
I have found an interesting video here from your training:

I am new with dynamo, so I am learning, finding good examples to apply in my work.
I have tried to script your Dynamo’s nodes and also I have written the entire Python’s code (in the node Python Script).

I got an issue when I run the code:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 37, in
ImportError: Cannot import name Messagebox

Do you know how I can solve it?

I have sent to you the .dyn via message. I hope you got it. Some images below:

Thank you so much!

Regards, Davide Bonfante


Please check for the Civil3DToolkit package also from @Paolo_Emilio_Serra1 to install it in Dynamo.
There you will find the nodes to create solids from TIN surfaces.



Thank you for your answer!
I have installed it.

My task is not to create a solid from a surface but I am going to create a solid between two surfaces, starting from a polyline as boundary.

The error now is:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 232, in
File “”, line 205, in create_solids
StandardError: Cannot create a PolySurface from an empty list

I attach the nodes I have created following the example in the video:
TinSurfaces.dyn (18.4 KB)

How can I solve it?
It is really identical to the example in the video but it doesn’t work.
This process would be really important in our design.

Thank you everybody!

Regards, Davide


You’ve made a typo.
Python is case sensitive.
Use MessageBox instead of Messagbox

@e.winter Thank you! I have already written Messagebox (look the picture).

The code that I have written is identical to the code of @Paolo_Emilio_Serra1

@mzjensen It seems interesting! Can you please show an example about how it works?
Do you mean that this node replace the python script?

Thank you!

Regards, Davide

Re-read what @e.winter suggested. Python is case-sensitive. You’ve typed Messagebox but it should be MessageBox.

I’d actually say it the other way. Your Python node is replacing something that already exists :wink:

@mzjensen that is amazing! I am on my way to office. As soon as I get to the office I try it.

I take the opportunity for questions.

  1. The python script would make also possible to create a boundary (fo example a “close” polyline) and extrude only the surface’s portion delimited to the selected boundary. Is it still possible with this node? Is it “path” maybe?
    PS of course I should cut the surface from Civil 3D but I am curious about it :relaxed:

  2. Can I get the area & volume of the new generated solid between the two surfaces?

Regards, Davide

  1. I haven’t tried the path, not sure if it works like this, but you can create a temporary surface by cropping the tin surface, using it to create the solids, and then delete it if you don’t need it :

  2. Yes you can get the volume using standard geometry nodes :
    Report volumes

The area as well you just need to select the faces for this.

Thank you so much for helping me! I really appreciate your support, it helps me to understand the approach! I wish you a good week!

Hi, I tried creating solids using this nodes.
Warning: TinSurfaceExtensions.CreateSolidsAtSurface operation failed.
Method not found: ‘Autodesk.AutoCAD.DatabaseServices.ObjectIdCollection Autodesk.Civil.DatabaseServices.TinSurface.CreateSolidsAtSurfaceToFile(Autodesk.AutoCAD.DatabaseServices.ObjectId, System.String, UInt16, System.String ByRef)’.

Got this error, can you let me know what this is ?

You likely need to update Civil 3D.

I have the same error, are you using 2021?

I think you need to be running Civil 3D 2020.4 at a minimum for those nodes to work.

Thanks Zachri, I’m using 2021 so I’m not sure what the issue could be.

I would just try to update as far as you can with Civil 3D 2021. The last update was 2021.3.