Looping list and custom structural framing type


I’m new to dynamo and I’m trying to do a simple structure whose information is stored in excel. The geometry part is ok but now I’m having doubts on how to loop the the list.

Basically I want to do the group “Attribute custom section to group X” for every list element in the “Get unique sections from the structure”. For that only the number node would need to change and I’d like for the structural framing type to be each of the first list elements (like IPE 600, SHS 70x3, etc).

Is that possible? If so can you give any pointer on how to achieve it?

Thanks in advance, Ana

first tip: don’t branch off the graph for each beam type, instead use the List.GroupByKey node.
Use the beam type name as the key to group the curves that need the same beam type. That way you can insert a list of beam types equal to the nummer of groups. one StructuralFraming.BeamByCurve can do it all.

I assume the excel file contains the name of the beamtype for each curve? If the names in the excel file don’t match the familytype names you might need to create a dictionary to match excel names to the familytype names, before you get the familytype elements.

Hi @timhevel ,

Thanks for your help. It makes sense. The thing is that the excel has collumn with starting node, collumn with ending node, collumn with section and so on (as you can see by the image).
To make the bars I already isolated the starting and ending nodes and associated them with the points list. Now, to use the List.GroupByKey I can’t figure out the best approach to cross the section information.

use List.RestOfItems @L2 after List.Transpose to get rid of the column headers.

Get the sections in a separate list using get item at index, then feed the sections into the keys input and the lines into the list input.

@timhevel thanks I was able to solve it!