Hi everyone,
Having an issue figuring out the correct side of the wall depending on how its drawn. Im using that to add dimensions to the correct side, however ive been having some issues.
im using the following code at the moment:
existing_line = wall.Location.Curve
start_point = existing_line.GetEndPoint(0)
end_point = existing_line.GetEndPoint(1)
wall_direction = (end_point - start_point).Normalize()
is_wall_right_to_left = wall_direction.X < 0
# Start with the assumption for external face
offset_sign = -1
# Adjust for wall's drawing direction (right to left)
if is_wall_right_to_left:
offset_sign *= 1
# Adjust for wall's flip
if wall.Flipped:
offset_sign *= 1
# Adjust for internal face selection
if selected_face == "Internal":
offset_sign *= -1
if is_wall_right_to_left:
offset_sign *= 1
if wall.Flipped:
offset_sign *= 1
This works fine in very simple floor plans and is correct, however with more openings and more walls it tends to have issues.