Consider Cases 1 and 2. In Case 1, the tubes were drawn in the order represented by the numbers in red. That is, if I select all by All Elements by Category the tubes will listed in the same order as the numbers, because Revit lists the elements in the order in which they are drawn.
In Case 2, for some reason, some pipes needed to be deleted and redrawn, in the order shown. Therefore, they will be in the order presented if I use All Elements by Category.
Is there any way to reorder the Case 2 tubes so that they are in the order of Case 1?