Profileview Start and End Station out of Order

Please take a look at these two methods to get the start and end stations of profile views. the top method returns the start end station in the correct order. The bottom method puts the first profile information at the end of the list.

Are there more than one alignment in the file and is the alignment from the dropdown used in more than one profile view?
Hard to tell the outcome from your script when the screenshot don’t show any outputs from the nodes, can you show the order of the list in “Alignment.ProfileViews” and in “ProfileView.GetProfileViews”.

1 Like

I wouldn’t say that they are “out of order,” but rather that they just aren’t in the order that you are expecting. Under-the-hood, Civil 3D will typically keep items in the same sequence that they are created. I can’t speak for the Civil 3D Toolkit node, but I know that the Camber node doesn’t modify Civil 3D’s internal ordering. So it’s up to the user to re-order things to fit their workflow.

Sounds like you may want things ordered by increasing station. If you just want to sort the station values themselves, the List.Sort node should do it. If you want to change the order of the Profile Views, then the List.SortByKey node should do the trick, with the stations as the keys.

2 Likes