ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TinContourRendererDefinition Class
Members Example

In This Topic
    TinContourRendererDefinition Class
    In This Topic
    Represents a renderer definition to draw contours in a surface layer.
    Object Model
    TinContourRendererDefinition ClassCIMSymbolReference ClassCIMSymbolReference Class
    Syntax
    public class TinContourRendererDefinition : TinRendererDefinition 
    Public Class TinContourRendererDefinition 
       Inherits TinRendererDefinition
    Remarks
    Once you define a renderer, you can call a surface layer's CanCreateRenderer, CreateRenderer, CanSetRenderer and SetRenderer methods to create and assign a renderer to a surface layer.
    Example
    Contour Renderer
    var contourDef = new TinContourRendererDefinition();
    
    // now customize with a symbol
    contourDef.Label = "Contours";
    contourDef.SymbolTemplate = contourLineSymbol.MakeSymbolReference();
    contourDef.ContourInterval = 6;
    
    contourDef.IndexLabel = "Index Contours";
    contourDef.IndexSymbolTemplate = indexLineSymbol.MakeSymbolReference();
    contourDef.ContourFactor = 4;
    contourDef.ReferenceHeight = 7;
    
    if (surfaceLayer.CanCreateRenderer(contourDef))
    {
      CIMTinRenderer renderer = surfaceLayer.CreateRenderer(contourDef);
      if (surfaceLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Contours))
        surfaceLayer.SetRenderer(renderer, SurfaceRendererTarget.Contours);
    }
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.LayerDrawingDefinition
          ArcGIS.Desktop.Mapping.TinRendererDefinition
             ArcGIS.Desktop.Mapping.TinContourRendererDefinition

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also