Changing all the exterior wall orientation to face Outward

For future reference, please read through the entirety of How to get help on the Dynamo forums. One of the biggest rules of the forums is to show your work/effort instead of just asking for the full script. We are all volunteering to help others. Even just showing a starting attempt, what you have tried and failed at, or linking the posts you have looked through (which for this problem there are a ton) would make people more willing to help you.

There are a few custom nodes that will return the vector of the exterior of the walls. In Clockwork it is called Wall.Orientation, in archi-lab.net it is Wall.ExteriorDirection.

I’ve seen people with a similar problem as yours make a giant room acting as the exterior so that all walls that make up that room will be selected as the room boundary. From there you can check if the exterior vector extends into the boundary, if not it needs to be flipped.

Try searching on the forums for more info.