Retrieving a wall and all other walls related to it

Hello guys,

I have kinda of a problem here that is not exactly Dynamo but mostly Revit I guess. I am trying with Dynamo to retrieve walls in a project and every wall that is connected to it. I am trying to run some checks on the wall and all its related other walls.

I have an idea of using Geometry.DoesIntersect node and use the same list of walls with two different levels but it is very messy. I tried with walls analytical mode but it did not give me what I want, plus it is history-based which means it is not possible to do what I am trying to do for each wall and vice versa.
I would appreciate any ideas.

Here is why I need a wall and all other walls related to it. Each wall will have a function either stiffening or stiffened depending on the direction of study.
1

2 Likes

Upload your script so we can see what you tried. Does intersect sounds like where you should start.

1 Like

I am sorry, I have not explained myself properly. DoesIntersect does what I want to do and serves my purpose. However, I am worried if there is sort of a class or function within Revit define relationship between two walls, such as inheritance attribute or something, similar to walls and its hosted elements walls and doors . I have searched the internet for such thing but could not find any, so I wanted to double check here in case there is something I am missing.

I do not want to go around the problem in a weird way in case there is a straight up way to do it.

As far as I know, there is a ElementsAtJoin property and a GetJoinedElements() method that finds walls at the ends and intersecting walls. In your case (T-junction) it will not work.

1 Like

Thank you very much. I will check it and see what happens.

Just to make sure, I access this property by importing RevitAPI and RevitElements to python node, right?

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
from Revit.Elements import *

You can edit the custom nodes Get Joined Elements and Get Elements at Ends of Genius Loci package to understand how it works if you want.

Alright, I will check it.

Thanks again.

See if you find something useful from solution found in this link:

Sorry to bother you again but I have tried your method and I am getting results but they are unwrapped and I cannot read them. I am trying to wrap them back using ToDSType() method but it is not working. Do you have an idea why?

The elements I am getting are Autodesk.Revit.DB.Wall. I also have imported the RevitElements and GeometryConversion extensions

add that to your code.
the Boolean True in python has to be used whit a capital case T so the correct is True not true. If the DSType conversion does not work you can try .ToProtoType().

I modified a bit the script from Genius Loci, which now can get all the T-junction walls, where original one cannot.

1 Like