Need to get a variable of type Iactiveview in advance ActiveView
1. Point drawing code where getoffdrawlist is loaded with point features of type ifeature
1 if(Getoffdrawlist! =NULL&& Getoffdrawlist.count >0 )2 {3Irgbcolor Getonoffptcolor =NewRgbcolorclass ();4getonoffptcolor.red =0;5Getonoffptcolor.green =0;6Getonoffptcolor.blue =255;7 8Isimplemarkersymbol Simplemarkersym =NewSimplemarkersymbolclass ();9Simplemarkersym.size =4;TenSimplemarkersym.color = Getonoffptcolor asicolor; OneActiveView.ScreenDisplay.SetSymbol (Simplemarkersym asisymbol); A foreach(IFeature Getofffeainchgetoffdrawlist) - { -ActiveView.ScreenDisplay.DrawPoint (Getofffea.shape asIPoint); the } -}
2, point drawing code
1 if(Emptypathstrdrawlist! =NULL&& Emptypathstrdrawlist.count >0)2 {3Irgbcolor Emptypathcolor =NewRgbcolorclass ();4emptypathcolor.red =255;5Emptypathcolor.green =0;6Emptypathcolor.blue =0;7 8Isimplelinesymbol Simplelinesym =NewSimplelinesymbolclass ();9Simplelinesym.color = Emptypathcolor asicolor;TenSimplelinesym.width =3; One AActiveView.ScreenDisplay.SetSymbol (Simplelinesym asisymbol); - - for(inti =0; i < Emptypathstrdrawlist.count; i++) the { -Ipolyline Emptyline =Emptypathstrdrawlist[i].emptypathline; - ActiveView.ScreenDisplay.DrawPolyline (Emptyline); - } +}
3. Polygon Drawing Code
1 if(Drawpolygonlist! =NULL&& Drawpolygonlist.count >0)2 {3Irgbcolor color =NewRgbcolorclass ();4Color. Red =255;5Color. Green =0;6Color. Blue =0;7 8Isimplelinesymbol Linesymbol =NewSimplelinesymbolclass ();9Linesymbol.style =Esrisimplelinestyle.esrislssolid;TenLinesymbol.width =1.0; OneLinesymbol.color =color; A -Isimplefillsymbol M_fillsymbol =NewSimplefillsymbolclass (); -M_fillsymbol.color =color; theM_fillsymbol.style = Esrisimplefillstyle.esrisfsnull;//. Esrisfsnull Hollow Polygon//. Esrisfssolid Solid Polygon -M_fillsymbol.outline =(Ilinesymbol) Linesymbol; - -ActiveView.ScreenDisplay.SetSymbol (M_fillsymbol asisymbol); + - foreach(Ipolygon Polygoninchdrawpolygonlist) + { A ActiveView.ScreenDisplay.DrawPolygon (polygon); at } -}
Related codes for drawing point lines in the Onafterdraw function in AE