Can I find the Wall an "Analytical Wall" is associated with?

Hi everyone!
Does anyone know a way to select the Revit Wall that is associated with an Analytical Wall, or vice versa? I found a workflow in here that generates geometry, then bounding boxes and then finds the intersections and that works. We have a graph that does that with the walls in our projects and I was hoping to get away from generating the geometry for performance reasons.

Basically, what we’re trying to do is find the highest and lowest elevations for the walls in our projects. As I said above, we have a graph that converts walls to geometry, then faces, add points and measures them. However, there are so many things that can cause situations that we have had to account for in the graph. Using the Analytical Wall will eliminate a lot of troubleshooting from our existing graph.

I would share the graph that I have but I’m really just trying to see if my question is even possible. If not then I’ll most likely start another post to get some feedback on the graph we currently have.

Thanks in advance!
TonyH

In the API there is a method GetAnalyticalModel() and GetAnalyticalModelId() that you can use to get the analytical model element from the physical model element. All you have to do is gather all the walls using Category + AllElementsofCategory, then run a quick python script using the one of the above methods to get the analytical elements paired with the physical elements. From this point, if you want to find the physical element that matches with a specific analytical element, then you just have to do some list management and pairing with the resulting 2 lists to get that information.

Thanks for the quick response Ben!. I’ll look for some info on what you’ve suggested. I’m not a Python guy (yet).

Thanks!
TH

You can try this to get the analytical walls from your walls, you will get the surfaces and the outline:

The python code is:

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

wall = UnwrapElement(IN[0])

aw = []

for j in wall:
    aw.append(Element.GetAnalyticalModel(j))


OUT = aw

Unfortunately, there are very few out of the box nodes created for the analytical model atm.
If you do end up going down the python road, you can do get the wall elements of the analytical walls with the same procedure as Luca suggest, by using the GetElementID() function.

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


aw = UnwrapElement(IN[0])


wall = []

for j in aw:
    wall.append(j.GetElementId())


OUT = wall
1 Like

Thanks!! So far this is working great! It’s unbelievable how simple the code is.

Thanks! We’ll use this one if we need to work in the other direction.

Any idea why this would show a warning? Hopefully the Screenshot is large enough.