Dynamo for Dummies (lesson 1)

I am trying to retrieve data (volume, in this case) from 3D Solids in C3D that represent volumes of soil to be excavated (please see example in the picture below).

It is “impossible” for a noob like me to find the correct node to do this operation and any help will be very much appreciated.

In my real world problem, there are different layers so I would like to extract the individual volumes of one layer only (each layer represents a type of material). In the picture above, the volumes are to be excavated in that order, according to the chainage.

What I came up so far (after working it for about 6h) is shown below. I know it can be “optimised” but the way it is makes it more “explicit” for me.

Is there any place I can learn this stuff, please? It looks like AutoDesk produced Dynamo for Revit or to work with corridors in C3D, not to mention its non-backwards compatibility…

PS: I also would like to work in the correct coordinates of the volumes - that I can possibly retrieve from the dwg but have no idea how…

Thank you very much in advance again!

Hi @alexmotta19,

Once you’ve selected the solids (looks like you have that part), then use an Object.Geometry node to get the geometry in the Dynamo workspace. After that, add a Solid.Volume node to list the volumes.

You’re in the right place! This forum is the best resource. There are also some great AU courses that I could link for you if interested.

Can you explain what you mean by this or what issue you’re running into?

1 Like

Hi, @mzjensen!

Firstly, thank you very much for this! You made it very simple and I got what I needed.

image

Thank you very much for your support and kind words!

“not to mention its non-backwards compatibility…”

I meant that the Dynamo I am using (embeded in C3D 2021) is “different” from the Dynamos I see in videos - YouTube and AutoDesk site (the nodes are different and lots of them do not exist in “my” version) - please let me know if I cleared it?

MANY THANKS AGAIN!

1 Like

No problem! :slightly_smiling_face:

When we talk about “Dynamo” it can mean different things. The core version of Dynamo (intuitively called Dynamo Core) is a collection of bundled components that consist of the graphical interface, the computation engine, the scripting language DesignScript, and the out-of-the-box nodes that are not specific to another program like Revit or Civil 3D. So this means that you can actually download Dynamo Core as a standalone executable (called Dynamo Sandbox) and use it completely independent from any other host application. However, this does mean that it won’t be able to “talk” to Civil 3D, or in other words, you won’t see any nodes for AutoCAD or Civil 3D in Dynamo Sandbox.

Dynamo for Civil 3D is basically just Dynamo Core running together with Civil 3D, and it includes additional nodes specifically for interacting with AutoCAD and/or Civil 3D objects. That’s what these shelves are for in the library:

And in fact, these nodes have not changed since Dynamo for Civil 3D was originally released in Civil 3D 2020. That effectively means that you can save out a graph to a .dyn file and be able to open and run that same graph in any version of Dynamo for Civil 3D.

What you are likely facing is that you don’t have a package installed that is being used in whatever videos you are watching. Packages are basically add-ons, developed by other users like yourself, to make Dynamo more powerful by adding new nodes. You just need to go here to download packages:

4 Likes

Thank you very much for this, @mzjensen! (APologies for the delay…)

@mzjensen, may I ask if you would know how to extract the layer of each solid?

I wish to export a list with the 3D solids and their layers (I don’t know how to “call” each solid yet though) as an Excel file and need to learn how to “get their layers”…

Many thanks again!

The Object.Layer node should work.

1 Like

Additionally, to get the solids you can use nodes on the selection shelf. Object by Layer > will get you all objects in a given layer, Object by Type > all objects of a given type. The Civil 3D Toolkit package allows you also to select graphically multiple objects

1 Like

Thank you, @mzjensen. I had actually done that but forgot to load the script. I noticed that the list of layers follows the same order that the list of volumes (I mean that I am stating that there is consistency in it, not inventing the gun powder!).

I think I can work with this - I was just thinking that I could extract the layer from the “geometry” but I was not thinking “Dynamo”. I see now that everything related to each object is available after the node “All Objects of Type”.

Thank you!

Thank you for this, @david_licona!

I wanted to avoid having to work with layers that are not relevant to me (no solids in them) - I hope this makes sense?

@mzjensen and @david_licona,

Thank you both again for your help.

Please let me show what I am trying to automatise (please don’t laugh! :slight_smile: ):

From a number of 3D solids, I want to generate the spreadsheet above.

If they come in two columns (column1 = layers and column2 = volumes), sorted by layer, I am happy.

Thank you again for any advice!

@alexmotta19 Can you please share an example .dwg and your current .dyn. I can help you with the excel table generation output.