Get start and end points from reference line in Revit family


Hi all,

I have a precast beam family and have a lot of instances of this family in the project for a viaduct I am modelling.

I need to populate a table of XYZ coordinates relating to the start and end point of each beam.

The problem I am having is that the main insertion point for the beam is based on a reference line located in the middle of the section, whereas I am looking for a point at the start and end at the bottom of the beam in the centre if that makes sense. I thought about getting the XYZ coordinates of the this line and then subtracting the difference from the Z value but as the beams are not necessarily horizontal, that will not give the right point.

I am looking to possibly draw a reference line along the bottom of the beam and get the start point and end point of this line. Is that possible?

Any help would be very much appreciated.




See if StructuralFraming.Location or Element.GetLocation return what you need:


Another option could be to let the geometry define the location of the top and bottom lines for you.

One possible method: Assuming the beams are all longer than they are wide or deep you can explode the geometry into just lines and get the four longest ones. Group these groups by the reasonably rounded Z value of the lines and make a line between each pair of lines.