// 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); }
// 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); }
Target Platforms: Windows 11, Windows 10