ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMMultipointGraphic Class / ToJson Method
The JSON serialization settings.
Example

In This Topic
    ToJson Method (CIMMultipointGraphic)
    In This Topic
    Creates a JSON encoding of the CIMMultipointGraphic and its current state.
    Syntax
    Public Overrides Function ToJson( _
       Optional ByVal settings As JsonSerializationSettings _
    ) As String
    public override string ToJson( 
       JsonSerializationSettings settings
    )

    Parameters

    settings
    The JSON serialization settings.
    Example
    Multi-point Graphic Element using CIMGraphic
    {
      // Note: must be called on the QueuedTask
      {
        //Place a multipoint graphic 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);
        //Create MultipPoints from the polygon
        var multiPoints = MultipointBuilderEx.CreateMultipoint(polygon);
        //specify a symbol
        var point_symbol = SymbolFactory.Instance.ConstructPointSymbol(
                              ColorFactory.Instance.GreenRGB);
        //create a CIMGraphic 
        var graphic = new CIMMultipointGraphic
        {
          Symbol = point_symbol.MakeSymbolReference(),
          Multipoint = multiPoints
        };
        graphicsLayer.AddElement(graphic);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also