JoinGeometry within sublists Python

Hello everyone,

I would like to join sublists of strings in the way you can see in green below the following image:

As you can see I tried to create the code with no success…

Thank you so much.

You can do this fairly easily with nodes as well. The issue with your code is that you’re not combining the current item with the previously combined items, only the first item.

4 Likes

Thank you so much @Nick_Boyts ! That it´s what I was looking for!

I thought that that workflow was going to work for my specific sample, working with elements instead of strings as I asked in the thread. Now I do realize that the approach differs from what I posted at the beginning or that’s what I think.

Please find a screenshot with the workflow I am trying to develop:

In the image, you will notice that I would like to join all the forms (geometries) within a sublist into one single geometry. I thought about creating a for loop which takes the first geometry and merges it with the second one (red). Then, takes the previous geometry joined and Python joins it with the third one so we get another single piece of geometry compound by the three first elements (geometries).

It is my second time with Python and my first one with Revit API so I would like to apologize because of my unknolewdge.

Thanks,