Tag all elements with orientation(better than the original function)

The original Tag-All functions of Revit can only select horizontally or vertically at one time. I try to adust them to the orientation of doors,with the orientation of elements.
根据方向放门标记

Here’s my full video of how I made it,The idea just come out of my mind,so I give it a try immediately.
https://youtu.be/FjUOrrBUztY