ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMPointSymbol Class
Members Example

In This Topic
    CIMPointSymbol Class
    In This Topic
    Represents a point symbol used to draw point features and point graphics.
    Object Model
    CIMPointSymbol ClassCIMCallout ClassCIMPointSymbol ClassCIMPointSymbol ClassCIMPolygonSymbol ClassCIM3DSymbolProperties Class
    Syntax
    Example
    How to construct a point symbol of a specific color and size
    {
        CIMPointSymbol pointSymbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB, 10.0);
    }
    How to construct a point symbol of a specific color, size and shape
    {
        CIMPointSymbol starPointSymbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB, 10.0, SimpleMarkerStyle.Star);
    }
    How to construct a point symbol from a marker
    {
        CIMMarker marker = SymbolFactory.Instance.ConstructMarker(ColorFactory.Instance.GreenRGB, 8.0, SimpleMarkerStyle.Pushpin);
        CIMPointSymbol pointSymbolFromMarker = SymbolFactory.Instance.ConstructPointSymbol(marker);
    }
    How to construct a point symbol from a file on disk
    {
        //The following file formats can be used to create the marker: DAE, 3DS, FLT, EMF, JPG, PNG, BMP, GIF
        //Note: Run within QueuedTask.Run
        CIMMarker markerFromFile = SymbolFactory.Instance.ConstructMarkerFromFile(@"C:\Temp\fileName.dae");
    
        CIMPointSymbol pointSymbolFromFile = SymbolFactory.Instance.ConstructPointSymbol(markerFromFile);
    }
    How to construct a point symbol from a in memory graphic
    {
        //Create a stream for the image
        //At 3.0 you need https://www.nuget.org/packages/Microsoft.Windows.Compatibility
        //System.Drawing
        System.Drawing.Image newImage = System.Drawing.Image.FromFile(@"C:\PathToImage\Image.png");
        var stream = new System.IO.MemoryStream();
        newImage.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
        stream.Position = 0;
        //Create marker using the stream
        CIMMarker markerFromStream = SymbolFactory.Instance.ConstructMarkerFromStream(stream);
        //Create the point symbol from the marker
        CIMPointSymbol pointSymbolFromStream = SymbolFactory.Instance.ConstructPointSymbol(markerFromStream);
    }
    Custom fill and outline
    /// <summary>
    /// Creates a point symbol with custom fill and outline          
    /// ![PointSymbolMarker](https://ArcGIS.github.io/arcgis-pro-sdk/images/Symbology/point-fill-outline.png)
    /// </summary>
    {
      //Note: Run withing QueuedTask
      var circlePtCustomFileOutlineSymbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.BlueRGB, 6, SimpleMarkerStyle.Circle);
      //Modifying this point symbol with the attributes we want.
      //getting the marker that is used to render the symbol
      var marker = circlePtCustomFileOutlineSymbol.SymbolLayers[0] as CIMVectorMarker;
      //Getting the polygon symbol layers components in the marker
      var polySymbol = marker.MarkerGraphics[0].Symbol as CIMPolygonSymbol;
      //modifying the polygon's outline and width per requirements
      polySymbol.SymbolLayers[0] = SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 2, SimpleLineStyle.Solid); //This is the outline
      polySymbol.SymbolLayers[1] = SymbolFactory.Instance.ConstructSolidFill(ColorFactory.Instance.GreenRGB); //This is the fill
      //To apply the symbol to a point feature layer
      //var renderer = pointLayer.GetRenderer() as CIMSimpleRenderer;
      //renderer.Symbol = circlePtCustomFileOutlineSymbol.MakeSymbolReference();
      //pointLayer.SetRenderer(renderer);
    }
    Point Symbol from a font
    /// <summary>
    /// Create a point symbol from a character in a font file
    /// ![PointSymbolFont](https://ArcGIS.github.io/arcgis-pro-sdk/images/Symbology/point-marker.png)
    /// </summary>
    {
      //creating the marker from the Font selected
      //Note: Run withing QueuedTask
      var cimMarker = SymbolFactory.Instance.ConstructMarker(47, "Wingdings 3", "Regular", 12);
      CIMPointSymbol fontPointSymbol = SymbolFactory.Instance.ConstructPointSymbol(cimMarker);
      //To apply the symbol to a point feature layer
      //var renderer = pointLayer.GetRenderer() as CIMSimpleRenderer;
      //renderer.Symbol = fontPointSymbol.MakeSymbolReference();
      //pointLayer.SetRenderer(renderer);
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMSymbol
             ArcGIS.Core.CIM.CIMMultiLayerSymbol
                ArcGIS.Core.CIM.CIMPointSymbol

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also