ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMPolygonGraphic Class
Members Example

In This Topic
    CIMPolygonGraphic Class
    In This Topic
    Represents a polygon graphic.
    Object Model
    CIMPolygonGraphic ClassCIMPolygonGraphic ClassCIMPolygonGraphic ClassPolygon ClassCIMSymbolReference Class
    Syntax
    Example
    Polygon Graphic Element using CIMGraphic
    //On the QueuedTask
    //Place a polygon symbol using the mapview extent geometry
    var extent = MapView.Active.Extent;
    //Contract the extent
    var polygonEnv = extent.Expand(-100000, -90000, false);
    //create a polygon using the envelope
    var polygon = PolygonBuilderEx.CreatePolygon(polygonEnv);
    
    //specify a symbol
    var poly_symbol = SymbolFactory.Instance.ConstructPolygonSymbol(
                          ColorFactory.Instance.GreenRGB);
    
    //create a CIMGraphic 
    var graphic = new CIMPolygonGraphic()
    {
      Symbol = poly_symbol.MakeSymbolReference(),
      Polygon = polygon,
    };
    graphicsLayer.AddElement(graphic);
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMGraphic
             ArcGIS.Core.CIM.CIMShapeGraphic
                ArcGIS.Core.CIM.CIMPolygonGraphic

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also