ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TinSimpleRendererDefinition Class / SymbolTemplate Property
Example

In This Topic
    SymbolTemplate Property (TinSimpleRendererDefinition)
    In This Topic
    Gets or sets a template for the symbol used in the renderer.
    Syntax
    public CIMSymbolReference SymbolTemplate {get; set;}
    Public Property SymbolTemplate As CIMSymbolReference
    Example
    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);
    }
    Simple Edge Renderer
    // applies to TIN or LAS dataset layers only
    
    var edgeRendererDef = new TinEdgeRendererDefintion();
    edgeRendererDef.Description = "Edges";
    edgeRendererDef.Label = "Edges";
    edgeRendererDef.SymbolTemplate = lineSymbol.MakeSymbolReference();
    
    if (surfaceLayer.CanCreateRenderer(edgeRendererDef))
    {
      CIMTinRenderer renderer = surfaceLayer.CreateRenderer(edgeRendererDef);
      if (surfaceLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Edges))
        surfaceLayer.SetRenderer(renderer, SurfaceRendererTarget.Edges);
    }
    Simple Face Renderer
    var simpleFaceRendererDef = new TinFaceRendererDefinition();
    simpleFaceRendererDef.SymbolTemplate = polySymbol.MakeSymbolReference();
    
    if (surfaceLayer.CanCreateRenderer(simpleFaceRendererDef))
    {
      CIMTinRenderer renderer = surfaceLayer.CreateRenderer(simpleFaceRendererDef);
      if (surfaceLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Surface))
        surfaceLayer.SetRenderer(renderer, SurfaceRendererTarget.Surface);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also