private void DrawEllipse()
{
try
{
//RemoveGraphics(((IMxDocument)ArcMap.Application.Document).ActivatedView.GraphicsContainer,
// ElementTag, esriGeometryType.esriGeometryPolyline);
//RemoveGraphics(((IMxDocument)ArcMap.Application.Document).ActivatedView.GraphicsContainer,
// ElementTag, esriGeometryType.esriGeometryPoint);
var ellipticArc = new Polyline() as IConstructGeodetic;
ellipticArc.ConstructGeodesicEllipse(Point1, GetLinearUnit(), MajorAxisDistance, MinorAxisDistance, Azimuth, esriCurveDensifyMethod.esriCurveDensifyByDeviation, 0.0001);
var line = ellipticArc as IPolyline;
if (line != null)
{
AddGraphicToMap(line as IGeometry);
}
//ElementTag = Guid.NewGuid().ToString();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
#endregion