Get Revit.DB.Reference from a grid

If its just Grids you can use
Maatvoering Stramienen.dyn (62.3 KB)

I posted Element.Geometry+ since it has the method for invisible objects inside it in Python, which might be of use.