// applies to LAS dataset layers only
var lasPointsClassificationRendererDef = new LasUniqueValueRendererDefinition(LasAttributeType.Classification);
// accept the defaults for color ramp, symbolTemplate, symbol scale factor
var lasDatasetLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<LasDatasetLayer>().FirstOrDefault();
if (lasDatasetLayer == null)
return;
if (lasDatasetLayer.CanCreateRenderer(lasPointsClassificationRendererDef))
{
CIMTinRenderer renderer = lasDatasetLayer.CreateRenderer(lasPointsClassificationRendererDef);
if (lasDatasetLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Points))
lasDatasetLayer.SetRenderer(renderer, SurfaceRendererTarget.Points);
}