Get Structural Foundation Attached to Column

Get Structural Foundation Attached to Column

kirsch33
Contributor Contributor
1,105 Views
2 Replies
Message 1 of 3

Get Structural Foundation Attached to Column

kirsch33
Contributor
Contributor

I am writing a Python revit extension using PyRevit. I need a way to be able to gather all structural isolated foundations, and then figure out what structural column they are attached to. 

 

When Revit attaches a foundation to a column base, it doesnt assign it a "host" as I have figured out so I'm struggling on other ways to get this relationship.

 

The context is that we use structural columns for foundation pier elements. I want to create a foundation tag that also places the pier tag at the same time, by being able to identify the element ID of the assosicated pier. I know Revit has some internal way of tying these elements together but I'm not sure what it is?

Any help is appreciated. 

@jeremytammik I see you posting solutions to these types of questions alot, any advice for this one?

0 Likes
1,106 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

Most relationships between Revit elements are represented by properties or parameter values on the element that you can explore using RevitLookup. Have you done so? 

 

If there is no accessible data on the element that represents the required relationship, you can mostly determine it by geometric proximity. 

 

In this case, I would expect a column's foundation to reside directly vertically below the column, and not many other BIM elements to be there. In such a situation, they can easily be retrieved using ray casting with the ReferenceIntersector:

 

https://www.revitapidocs.com/2022/36f82b40-1065-2305-e260-18fc618e756f.htm

 

Furthermore, I suspect that foundations can be identified by their category and .NET classes, so you can easily pass in a filter to the the ReferenceIntersector to retrieve only foundation elements. Check that out with RevitLookup as well.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

kirsch33
Contributor
Contributor

@jeremytammik Thanks for the reply. I will look into your suggestions.

In the mean time, I may have figured a work around? Potentially:

Found 1 foundation pier objects.
Setting Foundation Pier Top parameter for element #: 807562
Foundation Pier location string: (-3.483084828, 18.794103806, 0.000000000)


Found 1 isolated footings.
Footing ID #: 807568
Foundation Pier location string: (-3.483084828, 18.794103806, -9.000000000)

Basically, the pier and column have the same exact x and y values of the Location Point class. However, there are cases where the pier is not centered on the footing. Comparing a list of location points may be easy but wouldnt capture edge cases.

 

I'll look into RevitLookup and other suggestions.

 

 

0 Likes