Wall Flip

Hi All,

I know that the topic has been discussed before, but I haven’t found the solution to my problem.

I have 2 n-story walls (in this example 9). The wall from the left was drawn from left to right and the wall in the right was drawn from right to left/left to right, alternating (see below):

(*) There is a custom node that gets the lateral faces of the wall.

In the 3D preview of dynamo you can see that if I want the left face of the wall, it depends on the drawing direction.

In the second example I used the “Wall.Flip-Clockwork” hoping that the blue faces selected would be different, but nothing happend.

The goal in this is to get the left or right face, no matter the direction of drawing.

Hope you understand my issue, and hopefully you can help me.

Thanks in advance!

Any ideas?

Maybe you can use the normal of the wall faces and group by direction?
Something like this:

1 Like

@Einar_Raknes, Thanks for the response.

I made the script you show, but I dont get how this solve my problem.

The first story was drawn from left to right, the second right to left, and so on…

If I see the lines created (to visualize the vectors) the order follows the pattern showed above.

Am I missing something?

Regards

Do you want to select the faces or flip the walls? In the latter case you could try to rotate them 180 degrees.

@Einar_Raknes, I want to flip the wall.

Ok, I misunderstood this then.

Don’t worry. Do you know hot to make this possible?

Wall.Flip from Clockwork?

I have no idea, but try this:

1 Like

Hi @viktor_kuzev, I tried what you recommend, but it didn’t do anything.

I’m working in Revit 2016, Wall.Flip Python’s API code is for this version?

Thanks!

Thanks a lot! @Einar_Raknes that solved the problem I was struggling for a couple of weeks!

Well what it does is flipping the walls in the project:

I am not sure what do you need, though.

1 Like

@viktor_kuzev , I’ll give it one more try with your solution.

Thanks for the time!

Hi @Einar_Raknes.

I managed to create a script taking your idea. It works in a test model (perfect conditions). Now I’m working with an actual structural model (building that I’m detailing), but when the script reverse the walls, an error message cames out saying “The object is reversed” and the only option I get to continue is to delete the objects that I want to reverse.

So, what am I missing?

Thanks in advance.

Wall Flip.dyn (14.3 KB)

This is the python script I created:

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

x1 = IN[0]
y1 = IN[1]
x2 = IN[2]
y2 = IN[3]

cuenta = x1.Count

i=0
resultado = []

for i in range(cuenta):
	if x1[i]==x2[i]:
		if y1[i]<y2[i]:
			resultado.append(True)
		else:
			resultado.append(False)
	elif y1[i]==y2[i]:
		if x1[i]<x2[i]:
			resultado.append(True)
		else:
			resultado.append(False)
	else:
		if y1[i]<y2[i]:
			resultado.append(True)
		else:
			resultado.append(False)
	i=i+1	
	
OUT = resultado

I don’t know if you have missed anything, there are probably constraints or joins in the revit model that breaks when you try to flip the walls.

I don’t see how the python script above has relevance in that matter?

@Einar_Raknes, thanks for the response. I know that the Python code has no relevance about the issue asked, I only put the info to present the whole picture of the script (script attached).

How can I look for the constraints you mentioned? I think that those are created if the wll is joining with another wall in a perpendicular direction, for example. Right?

Any thoughts about?

Thanks in advance!