Replace Elements(Beams) with other types of Beams

Hello Everyone! I need to replace existing beams with the different types of beams. First problem i’m getting in sorting the list of beams i’m calling with the help of ALL ELEMENTS AT LEVEL. I’m unable to sort the list of beams having dimension of 12x24 and 12x36 kindly explain how to sort. Second how to replace with beams with the other types of beam.
I’m new to Dynamo kindly help. Your replies would be highly appreciated.

I’d post a screenshot showing your Dynamo graph or sample files
You are more likely to get an answer if someone else does not have to recreate or guess the problem