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

In This Topic
    TinNodeRendererDefinition Class
    In This Topic
    Represents a simple renderer definition to draw all nodes in a surface layer with a common symbol.
    Object Model
    TinNodeRendererDefinition ClassCIMSymbolReference Class
    Syntax
    public class TinNodeRendererDefinition : TinSimpleRendererDefinition 
    Public Class TinNodeRendererDefinition 
       Inherits TinSimpleRendererDefinition
    Remarks
    The symbol used to define the TinSimpleRendererDefinition.SymbolTemplate should be a ArcGIS.Core.CIM.CIMPointSymbol.

    Once you define a simple 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
    Create a TinLayer with renderers
    //Must be on the QueuedTask.Run()
    
    var tinCP_renderers = new TinLayerCreationParams(tinDataset);
    tinCP_renderers.Name = "My TIN layer";
    tinCP_renderers.IsVisible = true;
    
    // define the node renderer - use defaults
    var node_rd = new TinNodeRendererDefinition();
    
    // define the face/surface renderer
    var face_rd = new TinFaceClassBreaksRendererDefinition();
    face_rd.ClassificationMethod = ClassificationMethod.NaturalBreaks;
    // accept default color ramp, breakCount
    
    // set up the renderer dictionary
    var rendererDict = new Dictionary<SurfaceRendererTarget, TinRendererDefinition>();
    rendererDict.Add(SurfaceRendererTarget.Points, node_rd);
    rendererDict.Add(SurfaceRendererTarget.Surface, face_rd);
    
    // assign the dictionary to the creation params
    tinCP_renderers.RendererDefinitions = rendererDict;
    
    // create the layer
    var tinLayer_rd = LayerFactory.Instance.CreateLayer<TinLayer>(tinCP_renderers, MapView.Active.Map);
    Simple Node Renderer
    // applies to TIN layers only
    
    var nodeRendererDef = new TinNodeRendererDefinition();
    nodeRendererDef.Description = "Nodes";
    nodeRendererDef.Label = "Nodes";
    nodeRendererDef.SymbolTemplate = nodeSymbol.MakeSymbolReference();
    
    var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault();
    if (tinLayer == null)
      return;
    
    if (tinLayer.CanCreateRenderer(nodeRendererDef))
    {
      CIMTinRenderer renderer = tinLayer.CreateRenderer(nodeRendererDef);
      if (tinLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Points))
        tinLayer.SetRenderer(renderer, SurfaceRendererTarget.Points);
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.LayerDrawingDefinition
          ArcGIS.Desktop.Mapping.TinRendererDefinition
             ArcGIS.Desktop.Mapping.TinSimpleRendererDefinition
                ArcGIS.Desktop.Mapping.TinNodeRendererDefinition

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also