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

In This Topic
    CIMMarker Class
    In This Topic
    Represents a marker which is a self-contained shape or image that can draw for a point graphic or placed in a repeating arrangement along a stroke or within a fill. It can be a glyph from a font, a picture, a collection of vector geometries, or a 3D model.
    Object Model
    CIMMarker ClassMapPoint ClassCIMMarkerPlacement Class
    Syntax
    Example
    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);
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMSymbolLayer
             ArcGIS.Core.CIM.CIMMarker
                ArcGIS.Core.CIM.CIMCharacterMarker
                ArcGIS.Core.CIM.CIMChartMarker
                ArcGIS.Core.CIM.CIMglTFMarker3D
                ArcGIS.Core.CIM.CIMPictureMarker
                ArcGIS.Core.CIM.CIMVectorMarker

    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also