AE画点线,怎么画多个点和多线段

AE画点线,如何画多个点和多线段?
在VS2010arcgis engine中mapcontrol中操作,实现点击触发一个点击事件,或者运行就直接加载,自动加载代码中添加的坐标值和线段属性画图。
------解决思路----------------------
具体参考:
ARCGIS ENGINE + C#画点、线、面 
------解决思路----------------------
引用:
Quote: 引用:

具体参考:
ARCGIS ENGINE + C#画点、线、面 

我用你发的方法出现未将对象引用设置到对象的实例,该如何解决?可以指导一下吗?谢谢


      既然你都知道在容器里添加元素了
            pGraphicsContainer.AddElement(pElement, 0);
 
     那么你想添加几个点,不就是定义几个Element,再把它们都AddElement不就行了吗?
------解决思路----------------------
你能画一个点,不会画多个???
------解决思路----------------------
//首先要实现容器接口
            IGraphicsContainer pGraphicsContainer = axMapControl1.ActiveView as IGraphicsContainer;
            pGraphicsContainer.DeleteAllElements();//清空容器里面所有的元素

            //设置点的坐标

            for (int i = 0; i <= 100; i = i + 10)
            {
                IPoint pPoint = new PointClass();
                pPoint.PutCoords(300 + i, 300 + i);
                
                //IMarkerElement用来获得symbol属性
                IMarkerElement pMarkerElement = new MarkerElementClass();

                //用ISimpleMarkerSymbol来设置点的属性
                ISimpleMarkerSymbol pSymbol = new SimpleMarkerSymbolClass();
                IRgbColor pRGBcolor = new RgbColorClass();
                pRGBcolor.Red = 255;
                pRGBcolor.Green = 0;
                pRGBcolor.Blue = 0;
                pSymbol.Color = pRGBcolor;//红色
                pMarkerElement.Symbol = pSymbol;

                //IElement用来获得Geometry属性
                IElement pElement = pMarkerElement as IElement;
                
                //把IPoint转换为为IGeoMetry也能实现
                //IGeometry pGeometry = pPoint as IGeometry;
                //pElement.Geometry = pGeometry;
                pElement.Geometry = pPoint;

                //在容器里添加元素
                pGraphicsContainer.AddElement(pElement, 0);
                pElement.Activate(axMapControl1.ActiveView.ScreenDisplay);
                axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, pElement, null);