Retrieving the location of a reference?

Hello, I’m trying to get the location ( a line or a point ) of revit references that i get from wall layers, families or grids. so getting the location not directly from the revit elements themselves but from their references. any ideas on this? i found the attribute GlobalPoint but not sure whether it works this way! i would appreciate the help! thank you.