Topology Geometry

Discussion created by r0n3i1 on Aug 17, 2011
Latest reply on Aug 17, 2011 by r0n3i1
While editing (using topology editor), i want to get the current geometry (polygon geometry) for the selected edge.
So the user in Topology selects and edge, as they move it, I want to get the current geometry of the polygons participating in the edge.
Obviously this geometry will change as the edge is moved around.
I can hook into listeners no problem, just need to get the geometry of the polygons out.  I'm having trouble getting this geometry.  Any assistance is appreciated.  So basically I have some esriTopologyParent objects, but how do I get the current geometry out of this?

ITopologyGraph4 topograph = null;
            if (m_topologyExtension.CurrentTopology is ITopology)
                ITopology currentTopology = m_topologyExtension.CurrentTopology as ITopology;
                topograph = currentTopology.Cache as ITopologyGraph4;
            else if (m_topologyExtension.CurrentTopology is IMapTopology)
                IMapTopology currentMapTopology = m_topologyExtension.CurrentTopology as IMapTopology;
                topograph = currentMapTopology.Cache as ITopologyGraph4;
            IEnumTopologyEdge enumedges = topograph.EdgeSelection;
            ITopologyEdge topedge = enumedges.Next();
            while (topedge != null)
                IEnumTopologyParent leftparents = topedge.get_LeftParents(true);
                IEnumTopologyParent rightparents = topedge.get_RightParents(true);
                esriTopologyParent leftparent = leftparents.Next();
                esriTopologyParent rightparent = rightparents.Next();

                topedge = enumedges.Next();