# How to find Direction which wall is drawn

How di I find out if a wall has been drawn from left to right or right to left .It is important for one of my placement scripts.

Vector Y = 1 (Indicate Left to Right)
Vector Y = -1 (Indicate Right To Left)

Other Thing

Start Point < End Point (Indicate Left to Right)
Start Point > End Point (Indicate Right to Left)

Explanation of above is, when your end point (Point-x) is greater than your start point (Point-x) then you are plotting wall from left to right & itâ€™s reverse when you alter the points.(vice-versa)

2 Likes

If a comment solved your problem, please mark it as solution so others who have your problem can easily find a solution.

Or you could make your ouput conditional based on a â€śProject Northâ€ť reference vector.

3 Likes

I had a little fun with this one. Idea inspired by the combination of @robert12546358 and @Ewan_Opie post.

I used math round to 6 digits because when grabbing points x and y they can vary slightly at -e50. you can round deeper if you want but Revit does not care about things being slightly off at past the 6th decimal.

4 Likes

By Direction i meant only left to right or right to left. and flip it if it one of the other.

what if its a vertical line?

same thing i have to find the direction in which it is drawnâ€¦left to right and right to left.

if the wall is vertical what direction is right to left? does my graph not help?

Yesâ€¦but do u have a screenshot of the model itself so i can understand better.

I just drew random walls in a blank file. You can quickly remake my graph and do the same. Sorry I did not save the file as it was just a through away.

1 Like

k. No probs