Interior Elevation View - Automatic naming with cardinal directions

Hello all,
I am trying to create a graph that will automatically name interior views based on Room Name, Room Number, and orientations of room bounding walls to assign one of the cardinal directions (N, S, E, W).
So far this is my workflow:
1] I can identify and sort walls based on their cardinal locations based on this tutorial:

2] Get all interior elevation views in the project

3] Identify the walls parallel to each interior elevation view

I am hoping to be able to cross-reference the walls assigned to cardinal directions in step 1 to the walls identified in step 3 (that are parallel to the interior elevations planes) with the end result to automatically assign one of the cardinal direction (N, S, E, W) to the name of my elevations. However, I am stuck at this step.
Is there anyway to do a “If true then” condition in Dynamo? Please advise! Thank you!

Why get the directions of all your walls and try to match them up with the walls in your elevations? Why not get the walls in your elevations and then determine their orientation?

That being said, you could also get the View Direction from the elevation view itself.

Thank you for the tip Nick. This cuts down quite a few steps. I follow your advice and ended up with this

I’m still stuck on a solution to automatically assign a direction to the view name depending to the direction of the wall in view. Do you have any tips?

Your screenshot is illegible. Make sure you’re using the camera button in the top right corner of Dynamo to take legible screenshots. It will capture the entire workspace.

Thanks to your tips above, I’ve figured it out. The script is also attached.

After grouping views under each direction using the View.Direction node, it was easy to then assign a surfix (…- N, …- S) to the end of the view name when using the Element.SetParameterByName node.

View-Interior Elevation Naming v2.dyn (125.2 KB)

Hi @hoangtran,

Thank you for the great script! I have been trying to use your script. However, for some reason I couldn’t make it work correctly. What I mean with that is following:
Sometimes rooms have 3 views instead of 4 views and as soon as I run the script with 3 views it is giving me wrong room # with wrong Elevation view.
Is there a way to fix this issue? Any suggestion would be highly appreciated.

Thank you again for the script.!