How to create groups of walls (or elements)?

Hello guys!

I need to go through a specific level and make “groups” of walls (G1 is a group, G2 another, etc.) and specify the names of each wall by group (P1 and P2 are from G1, P3 and P4 are from G2, etc.), as in the image below.

I’m a beginner in Dynamo and I would like your help for that. Thanks.

Hi @brenofilipe how do you determine which walls are in which group?

You better create parameters for the grouping…and try further.

@_Vijay exactly, I was not so clear.

@Daan so, I decide to create something that checks each vertex of the element and in each vertex check if there is any element nearby. If so, add it to a list. Checking all vertex from a one wall, pass for other wall and repeate the process.

My code will be composed with these steps:

1.Go through for levels and take all elements by category (in this case, walls). Return the surfaces them and take the max point Z each surface in the list, because in the max point is the surface wich I want work. This step is in the image.

  1. If I know the max point and wich surface it is from, I take this surface and find each corner.

  2. I do the verification and add a list, as an explanation above. Then, I will have lists, with the walls, inside other list. Each “sublists” will be a group.

Right now, I’m in the first stage. My question is how I go through for the elements from a list and check wich have the max point Z (so return them). In the image, I find the coordenates from each surface and the max point each them. However, I want return the points that have this max point Z. You can help me in this step?

I did the first step and did this way:

Image 1 - I find wich surfaces that have max point Z, because I want them for work

Image 2 - I find the corner points by face and change color for red

Now, I go to second step. If you have some tips,I appreciate it.