How to find Direction which wall is drawn

revit
dynamo

#1

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.


#2

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)


#3

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


#4

Or you could make your ouput conditional based on a “Project North” reference vector. :wink:


#5

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.


#6

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


#7

what if its a vertical line?


#8

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


#9

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


#10

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


#11

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.


#12

k. No probs