Number piles according to scope box direction

Hello forum,
I’m new to Dynamo and are wondering if it’s possible to number a set of piles according to the rotation of a scope box? I have numbered according to the coordinate system, but since the house is rotated the numbering does not align with how the house is rotated on sheet.
So what I want to do is basicly chose of my liking the scope box and number the piles within that scopebox along the house.
Is this possible? And any hint towards how it could be reached?

Thankful for any answer. :slight_smile:

Certainly possible, but it may be easier to do this with a coordinate system transform, base coordinate system from the building’s orthogonal walls and the new origin at the rotation origin.