Solved! Go to Solution.
void CreatePolylineFromExistingGeometries(ESRI.ArcGIS.Geometry.IPolygon pPolygon1,
ESRI.ArcGIS.Geometry.IPolygon pPolygon2)
{
//Build a new polyline by intersecting two existing polygons.
ESRI.ArcGIS.Geometry.ITopologicalOperator2 pTopoOp2 = pPolygon1 as
ITopologicalOperator2;
//Simplify.
pTopoOp2.IsKnownSimple_2 = false;
pTopoOp2.Simplify();
ESRI.ArcGIS.Geometry.IPolyline pPoly = pTopoOp2.Intersect(pPolygon2,
ESRI.ArcGIS.Geometry.esriGeometryDimension.esriGeometry1Dimension) as
IPolyline;
//pPoly is the new generated polyline.
}