Tag in clockwise direction: Sort Vector Rotation



Hi all,

My plan is to sort a list of angles created from the “vector.angleaboutaxis” node in a clockwise direction.

I assumed that this would start the Y Axis at 0 and it would end at 360 in a clockwise direction.

I’m either wrong or my script is wrong as they are in a jumbled order when referencing them in Revit.

Please see the screenshots below which will hopefully clarify my poor attempt at a description:

I am focusing on “List 1” for this example (highlighted above) as it has quite a few pipes to sort out.

The script is getting the angle from the centre of the circle to the end point of each pipe. I’ve tried reversing the vectors before getting the rotation but that hasn’t worked.

I hope someone can help!

Thanks in advance,


Door Numbering Clockwise by Room Number (with Room Entry Door Override)

@Tom_James Normalize the vectors before determining their angles with respect to the Y-Axis (about the Z-Axis)


@Vikram_Subbaiah Thanks for the response, sorry I’ve been pretty swamped today so I haven’t managed to have a lengthy play around.

I did try your normalized method but the values stayed the same. What I did see in your script was the Vector.YAxis node inputting to “othervector”. This did change the values to but only by 360 - “the value”. Still not correct as it’s calculating between the same points - wishful thinking!

I can’t access the model at the moment so I can’t give you accurate angles, but what I’m expecting is something along the lines of:

Expected angle from centre of circle to end point of pipe:
A angle = 10°
B angle = 90°
C angle = 190°
D angle = 280°

C angle = 349°
D angle = 348.117°
B angle = 348.115°
A angle = 347°

I’ll have another play around when I get the chance but deadlines are looming at the moment. I’ll try and get on tonight and let you know how it goes.



@Tom_James If it still doesn’t work see if you could post a dynamo definition along with a small revit file. Would help us understand your problem better.


@Vikram_Subbaiah Thanks Vikram but i’ve sorted it, just had some problems with lists that i didn’t realise until now.

All i had to do was remove the first list.map node and plug it straight into Vector.Bytwo points with lacing set to longest and it worked perfectly!

Sorry for wasting your time, thanks for the help.


@Tom_James Thanks for posting this. I was able to reverse engineer your logic and make a door renumbering graph. Instead of just numbering from 12 o’clock, I have a conditional that allows you to define the numbering start point by using a yes/no parameter along with Bakery’s “Replace Item if True” node. See blue group 3/4 of the way to the right. Hopefully it’ll be of some use.

Door Renumbering Clockwise by Room Number v1.3.0.dyn (90.5 KB)
Door Renumbering Test_2016.rvt (1.5 MB)


Why not posting that in the Share category with the appropriate title instead? It would probably be better referenced by the search tool… :slightly_smiling_face:


Will do.