Get geometry from Reference/GeometryObject

Alright, I’m stumped again.

I’m trying to get the reference planes from a FamilyInstance. I can figure out how to retrieve them as references, and convert them to GeometryObjects, but I’m stuck on the last step.

elem = doc.GetElement(ElementId(2601041))
sub_elem = elem.GetSubComponentIds()
sub_elem = doc.GetElement(sub_elem[0])
r_top = sub_elem.GetReferenceByName("Top")

go = sub_elem.GetGeometryObjectFromReference(r_top)

It seems that if I were using C# I could just use ReferencePlane go = sub_elem.GetGeometryObjectFromReference(r_top) as ReferencePlane

But using as that way in Python doesn’t seem to work.
Anyone have any tips?

@stewart.skyler check the Wall Edges References node from the GeniusLoci package