Grouping same rebars of an element in a set

Hi everyone,

By splitting my rebars as I asked here Spliting each rebar exceeding 12m length in a rebar set then using “Create.FormCurve” from structural design package I obtained singles rebars in each row which I want to group them again in a set as they were at the beginning as shown in the 2nd image

Any idea to do that?


Rebar Container node from Dynamo Rebar


Can you please show me how to that in my attached script bellow?
I attach also my Revit file
division_long_barres.dyn (42.1 KB)
wall.rvt (2.5 MB)