Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Create FeatureClass doesn't draw point

$
0
0
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!?

Code:

            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

Viewing all articles
Browse latest Browse all 1374

Trending Articles