Get endpoints of gridlines visible in view

I am trying to access the end points of the gridlines visible in a given view. It’s easy to access the 3D endpoints of the grid from the Grid.Curve property, but as far as I can tell, the Revit API does not have a property or method for accessing the 2D endpoints. This makes it difficult to place grid dimensions at a consistent location relative to grid bubbles across all views.

Is anyone aware of a workaround solution to this problem?

Have a look at this thread, i suspect it will interest you very much :slight_smile:

1 Like

Thank you!

I also found the .GetCurvesInView method hiding in plain sight, and it does exactly what I want. Not sure why it took me so long to find it.

For those looking for a quick answer to the same question, this will return the 2D curve from a grid in the active view:
Grid.GetCurvesInView(DatumExtentType.ViewSpecific, doc.ActiveView)

1 Like