Using the Revit API to Retrieve Rebars Attached to a Structural Element

From the The Building Coder website:

Retrieve Rebars Attached to Structural Element

Question: How can I get all associated rebars which attach to a structural element such as a column by picking that?

Answer: Jeremy initially suggested workarounds making use of filtered element collectors. Unfortunately, that was not very helpful in this case.

Happily, Einar Raknes came to the rescue pointing out the real solution for this:

You can use the  RebarHostData  class and the  GetRebarsInHost  method to…
Read more