ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMPointCloudStretchRenderer Class
Members Example

In This Topic
    CIMPointCloudStretchRenderer Class
    In This Topic
    Represents a point cloud stretch renderer.
    Object Model
    CIMPointCloudStretchRenderer ClassCIMPointCloudStretchRenderer ClassCIMColorModulationInfo ClassCIMColorRamp ClassCIMPointCloudStretchRenderer ClassCIMPointCloudAlgorithm Class
    Syntax
    Example
    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(
                             PointCloudRendererType.StretchRenderer);
    var stretchDef = new PointCloudRendererDefinition(
                              PointCloudRendererType.StretchRenderer)
    {
      //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
    pcsl.SetRenderer(stretchRenderer);
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMPointCloudRenderer
             ArcGIS.Core.CIM.CIMPointCloudStretchRenderer

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also