How to perform the query of wall layers+attributes in a loop to write it in Excel?

Thank you in advance for every input!

Since information about wall layers is often not exported correctly during the IFC export of walls, I would like to read out the containing layers with their layer thicknesses for multi-layer wall types.

The problem is as follows:
I have put together a working workflow for 2 wall types. However, I would now like to automate the query a bit, because it does not make sense (and also is not possible) to create dynamonodes for each element-type, as there are 100+ wall types. First approach:

Are there any nodes in one of the libraries /packages, which are suitable to create “for each” loops or would I have to write this myself with a custom python node?

I would need something like this:

For all wall types get material layers + get material thicknesses and store them in separate lists which are linked to the list of wall types.

Unfortunately I can’t program Python. In Java it would probably boil down to 2 treemaps containing ArrayLists as values, maybe there are already ready-made nodes for such a thing? Approx. in this logic:


Afterwards, I would again use a loop to write all the data to Excel.
Column A - WALL_MATERIALS (keys)
Column B - WALL_MATERIALS (values)
Column C - WALL_THICKNESSES (values)

For row spacing, I would use the (ArrayList.length() - 1) of each key in WALL_MATERIALS to get the number of blank spaces under each key in the Excel. The end result should be a continuous list in this format:

Das dazu erstellte DynamoSkript:
DynamoQueryWalltypeLayer.dyn (91.8 KB)

Hi @d.feyerer
I don’t know what you mean with a for loop node? I have seen this question alot, but Dynamo takes care of this for you. If you have a List of values and you feed this to a node, Dynamo automatically does the nodes function For each item in the list?

Besides that, below you see my graph with the result for you question. I have the feeling this all can be done with a lot less node when you use the proper structures in lists.

WallTypesToExcel.dyn (53.4 KB)

Let me know if this works for you or if you have any questions

1 Like

Thanks for your help, the script works perfectly and reproduces exactly the desired result!

I am now going through the script point by point, if any questions arise, I would post them again.