Sorting elements and use formula to set a parameter


I’m getting all my collums form revit. Now I want to calculate the totalt weight of every collum and wright it back to a costum parameter in Revit. My problem is to sort the different collums, get its length parameter and multiply it with a weight/meter number.
Is there an easy way of sorting the list and use an “If” formula in Dynamo?

Best regards Mons

SortByKey and If should be what you’re looking for. However, I’m not understanding why you need these nodes if you’re just writing back to a parameter. What is the grouping for and what is the If statement for?

I want to get a total weight parameter that calculates from the insanse parameter Length. I have different collums so I wanted to make a block were all the diffrent weight pr meter values was located and calculate based on witch collumtype I’m inserting.

I solved it earlier by adding a weight pr. meter parameter in the family, and then used a simple node to calculate the value.

Thanks for replying :slight_smile:

Might be easier to include a type parameter for weight/meter rather than trying to manually match up all the column types. Just my two cents.