ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMColorModulationInfo Class / MaxValue Property

In This Topic
    MaxValue Property (CIMColorModulationInfo)
    In This Topic
    Gets or sets the maximum value to compute modulation on linear scale based on field value.
    public double MaxValue {get; set;}
    Public Property MaxValue As Double
    Create and Set a Stretch Renderer
    //Must be called on the MCT
    //var pcsl = ...;
    //At 2.x - var fields = pcsl.QueryAvailablePointCloudRendererFields(
    //                           PointCloudRendererType.StretchRenderer);
    var fields = pcsl.GetAvailablePointCloudRendererFields(
    var stretchDef = new PointCloudRendererDefinition(
      //Will be either ELEVATION or INTENSITY
      Field = fields[0]
    //Create the CIM Renderer
    var stretchRenderer = pcsl.CreateRenderer(stretchDef) 
                                       as CIMPointCloudStretchRenderer;
    //Apply a color ramp
    var style = Project.Current.GetItems<StyleProjectItem>()
                                    .First(s => s.Name == "ArcGIS Colors");
    var colorRamp = style.SearchColorRamps("").First();
    stretchRenderer.ColorRamp = colorRamp.ColorRamp;
    //Apply modulation
    stretchRenderer.ColorModulation = new CIMColorModulationInfo()
      MinValue = 0,
      MaxValue = 100
    //apply the renderer
    Edit Color Modulation
    //Must be called on the MCT
    //var pcsl = ...;
    var def = pcsl.GetDefinition() as CIMPointCloudLayer;
    //Get the ColorModulation off the renderer
    var modulation = def.Renderer.ColorModulation;
    if (modulation == null)
      modulation = new CIMColorModulationInfo();
    //Set the minimum and maximum intensity as needed
    modulation.MinValue = 0;
    modulation.MaxValue = 100.0;
    //apply back
    def.Renderer.ColorModulation = modulation;
    //Commit changes back to the CIM

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also