Sort elements in flow order

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?

Give it a try at this approach. Solution.dyn (16.4 KB)


You would have to install the MEPover package.

If it doesn’t work out, it would be a good idea to share your file here.

3 Likes

It worked like a charm. I just put the GetItemAtIndex to get at a specific point (my reservoir). It totally solve the problem.

Thank you, sir.

1 Like

Glad that it worked out for you.

1 Like

why not work here?

@Tiago Did the above solution work for you?

it is not working for me this would be the last step for my project to work.

Could you help me don’t know what to do to get out of this labyrinth

@Tiago Sure, can you share your file.

1 Like

HIDRÁULICA_0000.dyn (99.1 KB)

Above is the project
HIDRÁULICA_0000.dyn (99.1 KB)

@Tiago I need the Revit file as well

http://www.filedropper.com/hidraulicaforum

Hey @Tiago,
I tried few things but none of them gives 100% correct output.

See what works best for you from either of these.

I’m afraid I won’t be able to get you out of this Labyrinth!

Good Morning

I believe you got my goal wrong.

Objective and create a list with the values ​​contained in the parameter of the families "Pipe section = 129, 1, 159,107,84 … these values ​​are in a list going downstream like the fluid.

checking the image:

the list must contain all elements that have the same parameter for example

list 1 “value of Parameter 107”
[0] Reservoir
[1] Tube

list 2 “value of Parameter 159”
[0] Reduction
[1] Tube

list 3 “value of Parameter 116”

[0] te
[1] Tube
[2] Union
[3] Reduction Knee
[4] Pump
[5] Tube
[6] Union
[n] …

list 4 “value of Parameter 129”
[1] Te
[2] Tube
[n] …

list 5 “value of Parameter 1”

[0] 65mm
[1] Pipe

list 6 “value of Parameter 84”

[0] Pipe
[1] Te

list n "value of Parameter x

@Tiago Yes, I did understand your question.
But somehow Dynamo is not able to get everything in correct order.
If I try to sort the list based on connections, this is what I get:
107
159
129
84
137
1
(you see 1 should have been after 129 but Dynamo is not able to identify that)
And that is something I couldn’t solve

you can tell me if it is possible to organize based on the flow order, in this link: https: //forum.dynamobim.com/t/reading-direction-property-of-connectors-on-ducts-pipes/8424/3

the link routine follows the direction above, I would like to know if using it mine could be organize

I don’t think it would help because it’s giving you points based on the order of the input(which in your case is random).

Tagging the MEP expert @T_Pover to see if he can suggest a solution for you.

thx bro

good morning could you help me would like to perform this task on the nested families so that they are also alerted by the parameter

You can use the node “Pipe Upstream Components” from MEPover Package to get the sections in the flow order and then renumber them in a new parameter (a shared parameter, so you can tag the value)