Data Order in Element Selection - Surfaces of a Wall

Hi All,

I have an issue with the of the surfaces that I get from the elements selected. Here is a step by step description.

1.- I want to select the Wall element, then explode the solid and from then have the surfaces to work with. I want to put rebars in the corner surfaces of a wall. This is the model I’m working with (test drive).

2.- With my script, I select the wall elements indicated and I get the expected result. Rebars in the place That I want.

Here are the surface order wich is used to make a polysurface and then create the lines for rebar.

3.- Now, and here’s the problem, I want to place rebar in the walls from the other direction (like indicated in the next image), and when I see the selected faces from the walls, the corner I want for the first floor is in the opposite side of the wall.

How can I get rid of this problem? Is like if I draw the wall from right to left the order of the corner faces is different from if I draw the same element from left to right?

I want to select the element no matter of what wall direction I’m working with.

Here are the dynamo Scripst and the Custom Nodes that I created for this particular problem. Also, I’m working with the Dynamo 4 Rebar, BIM4Struct, Steam Nodes and Springs packages.

The INPUT is just selecting the walls to work with and the “Select Model Element” is for the bottom element.

punta_tipo_v3.dyn (53.1 KB)
RLE.CarasLaterales.dyf (8.5 KB)
RLE.Centro.dyf (3.0 KB)
RLE.Centroide.dyf (4.3 KB)
RLE.FiltroSeleccion.dyf (7.6 KB)

Thanks in advance. I’m open to suggestions.


Working with lines selected on the first floor and repeating the result on higher levels would not suit your need?

… if I draw the wall from right to left the order of the corner faces is different from if I draw the same element from left to right?

That’s correct, the likelihood is then, that you’ve ‘flipped’ these wall elements to match the wall buildup of the walls that were drawn left-to-right (or whichever wall has the external finish on the outside).

What you can do is evaluate (employ some Boolean logic) if the wall Flip parameter is set to true. If it is then select indexes 0, 2, 4…etc otherwise select 1, 3, 5…

Also, if you’re looking to calculate surface area or create rebars to the full extents of the wall, be aware that unless your wall joins are mitred or you use some very slick API calls/logic, your surfaces will only match the length of the respective wall centre line, not the additional length created by Revits internal wall join algorithm.

1 Like

Here is how to select faces using BoundingBox.Contains:

1 Like

Hi, thanks for the reply. The solution you mention is also valid, but now I’m trying to get tehe information rom one selection. I’ll try the “BoundingBox Contains” solution mentioned below.

Hi, thanks for the answer. The evaluation of the “Flip” parameter looks like a good idea for my purpose, I’ll work on this idea. Thanks.

Could you be more specific about the lenght you mentioned? The difference from the revit lenght than the surfaces selected.

Thanks in advance.

Left has mitred joints, right has default joints. Notice the gaps with the one that’s not mitred. The length is derived from the length of the centre line of the wall (that location line with the two handles to control the position of the wall). It is possible to get the actual external extents regardless of the join…because I’ve done it…but its complicated and you have to use the Revit API.