Automatic Renumbering of Beams

Hi,

This is my first script in dynamo in which I am facing the following issue.

I am trying to develop a script so that my beam elements are sorted first parallel to X and then parallel to Y and within that sort based on the distance of the start point from origin, based on the Landform package. So far it is working. Now when I am trying to group the sorted list back into the beam family, it is not combining it properly. Attached is the snapshot and the script file.

Appreciate if the experts can advise where I am going wrong.

Thanks in advance.

Cheers,
AshokAutoNumber Beams_R1.dyn (17.0 KB)

Hi @Ashok_Kannan

Welcome to the forms. I think I understood your question correctly but if not let me know.

You can probably just get rid of List.Flaten and use levels instead. This will keep your lists sorted as they are after List.GroupByKey. The output of List.Create in my graph should be the output of Curve.StartPoint in yours.

Hi @Steven

Thanks for your input. It worked like a charm.

Cheers,
Ashok

1 Like