Flip hand - holdown extents selection

I have a holdown that I am using dynamo to place at the end of every shear wall.
However, the holdown is offset by the number of studs between the wall end. Sometimes these items come in facing the wrong direction.

I tried comparing the distance of the holdown to the wall centerpoint, and if thats greater than half the length of the wall, I flip. However, the holdown’s origin is where this is measured from, and does me no good. Does anyone have any thoughts?

I got it! I used a bounding box and pulled the centroid