cbrannin

Create FeatureClass doesn't draw point

Discussion created by cbrannin on Mar 4, 2014
Latest reply on Mar 6, 2014 by cbrannin
Hello

When I try to create a new featureClass I do not get the symbol created with the row(s) in the table. So I am trying to add the symbol as the featureClass is being created. Is this the right process or should the symbol be added on the creation of the featureClass? The coordinate flashes upon creation but does not stay!?

            IPoint makePoint = new PointClass();
            double xCoor = Convert.ToDouble(listVariants.SelectedItems[0].SubItems[6].Text);
            double yCoor = Convert.ToDouble(listVariants.SelectedItems[0].SubItems[7].Text);
            makePoint.PutCoords(xCoor, yCoor);

            IMxDocument drawDoc = (IMxDocument)ArcMap.Application.Document;
            IActiveView drawView = drawDoc.ActiveView;
            IScreenDisplay drawDisplay = drawView.ScreenDisplay;
            short screenCache = Convert.ToInt16(esriScreenCache.esriNoScreenCache);
            drawDisplay.StartDrawing(drawDisplay.hDC, screenCache);
            

            ESRI.ArcGIS.Display.RgbColorClass color = new ESRI.ArcGIS.Display.RgbColorClass();
            color.Red = 55; color.Green = 100; color.Blue = 66;

            ESRI.ArcGIS.Display.ISimpleMarkerSymbol simpleMarkerSymbol = new ESRI.ArcGIS.Display.SimpleMarkerSymbolClass();
            simpleMarkerSymbol.Color = color;
            simpleMarkerSymbol.Size = 8;
            drawDisplay.SetSymbol(simpleMarkerSymbol as ISymbol);            
            drawDisplay.DrawPoint(makePoint);
            
            drawDisplay.FinishDrawing();        


Please, any suggestions are greatly appreciated!

Cheers
Chris

Outcomes