Hi everyone,

I hope someone is able to assist me here.

In the image above, the green item is a wall, the red item is a room separation line and the orange item is the desired outcome.

I am looking for a way to take the room separation lines and use them to divide up a Revit wall. In the example “0105 Office” is one space and “0106 Office” is a separate space. I am trying to get the wall area for the part of the wall interacting with space 0105 only. I have tried using a variety of intersect nodes but so far I haven’y had any successful results. Could anyone point me in the right direction here with what the method should be? I have also tried to convert the wall items to surfaces, extract the curves and use the model curve which acts as the room separation line to divide it but was also unsuccessful.

Any help would be appreciated!

Thank you!

I should add that all I am looking for is the wall area, no other information. Not sure if that would make a difference to the method used?

So, a straight wall is defined by a curve with two endpoints.

If you can find intersection point between the room separator and the wall location curve than you can calculate distances from intersection point to both endpoints.

If you multiply those distances by walls height it will give you areas you are looking for…

Maybe it can be done easier than in the example below with some fancy nodes. I am finding wall height by comparing bounding box min and max Z values.

Thanks very much for the response Maciek, the concept makes sense.

What nodes are you using for the locationCurve though, I cant seem to find that one?

I didnt want to overcomplicate my answer and I am pretty sure there are very good nodes existing for retrieving location of the element.

I am on a quite ancient Dynamo version and didnt have one, so I used a small python piece.

In case you won’t find anything better, here it is:

```
import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
#The inputs to this node will be stored as a list in the IN variables.
element = UnwrapElement(IN[0])
location = element.Location
#Assign your output to the OUT variable.
OUT = location.Curve.ToProtoType()
```

Thanks very much, I appreciate the help!

Hi Maciek,

Thanks very much again for helping me with this, I wonder if you could offer one final bit of assistance?

Do you have any idea how to take this concept and apply it project wide in an automated fashion, without having to manually select items?

I have tried a number of different approaches, but the issue I am running into is that my wall count and my room separator lines are not consistent in terms of quantity, so the lists dont match up.

Any ideas?

Thanks.

Mitch

Hi,

how are you looking for wall/separator pairs? Are you testing them for intersections?

Could you maybe show where you are stuck at the moment.

Is it a specific wall type that you want to process?

I am trying to search project wide using the DoesIntersect node, but I don’t have the correct data types to feed into this node for a successful outcome, so this is actually the exact part I am stuck with. I don’t know how to search project wide for walls that have intersecting Room Separation lines.

At the moment the wall type is irrelevant, I just need to find where ANY wall in the entire Revit project has an intersecting room separation line and apply the procedure you gave me. What you gave me works great but I cannot select each wall/separator pair throughout the project as there are a lot of them.

If you could point me in the right direction how to scale your solution up to an automated project wide procedure I would greatly appreciate that!

Thank you!

So I have been developing this node package called Onion. It is in a quite early stage, but you can try it. It is available through the standard package manager in Dynamo.

There is a node there named Element.LinearIntersections. I have not tested it with model lines (such as room separators) but I think it might work. I cannot check it at the moment…

It takes two lists as an input - so one list would be all your walls and the second all the room separators. As a result it should output pairs that are intersecting and intersection points. Some short description can be found here: http://lubim.co/dynamo-nodes/

The only problem is, that it is intersecting location lines of elements, so the base of the wall should be on the same exact workplane/elevation as the room separator. There is also an option to ignore the Z value of elements, but then you would have to check if the wall is on same Revit level as the room separator (not the level below for instance). I plan to expand functionality to allow additional solid intersection checks, but for now it is what it is:)

Hope that helps! If not let me know

Thanks very much for the info Maciek.

Unfortunately it does not work, I just receive null values for everything

I will try and find another method, alternatively, modelling practices in Revit will have to change to make this script work correctly.

Thanks for all your help!

Hi,

I have just tested it and it should work:

If it doesn’t work because of the levels issue (room separators are on different levels than wall base) than you can try a bit more complex approach

Hi Maciek,

Okay great I will try that now. My two lists of items are different length though, is that going to make a difference?

I think that is where all the issues are coming up, I have about 1111 walls, and only 156 room separator lines or so, will that matter in this case?

I can’t get anything out of your custom node, it only returns nulls.

Hi,

lists dont have to be equal in length. The node is trying to intersect every element from list A with every element from list B. So it should be ok just to input all your walls to one slot and all your separators to the other.

Hi,

I did manage to find a solution to this problem, but thank you very much for your time, really appreciate the help and your patience

Keep Well!

1 Like