Select all element with the same wall type and change vertical grid sequence

I am creating a script to select all element with the same wall type and change vertical curtain wall grid sequence.

I have managed to get the change vertical curtain wall grid sequence for one element but struggle to select all elements with the same wall type. We need to change the vertical curtain wall grid for hundreds of wall and would be much more efficient if we can select multiple objects.

Please see the dynamo script from the following we transfer.

Thank You!