ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMVoxelUniqueValueRenderer Class
Members Example

In This Topic
    CIMVoxelUniqueValueRenderer Class
    In This Topic
    Represents a unique value renderer.
    Object Model
    CIMVoxelUniqueValueRenderer ClassCIMVoxelUniqueValueRenderer ClassCIMColorRamp ClassCIMColor ClassCIMVoxelUniqueValueRenderer Class
    Syntax
    Example
    Get the Variable Renderer
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    var variable = voxelLayer.GetVariableProfiles().First();
    var renderer = variable.Renderer;
    if (variable.DataType == VoxelVariableDataType.Continuous)
    {
        //Renderer will be stretch
        var stretchRenderer = renderer as CIMVoxelStretchRenderer;
        //access the renderer
    
    }
    else //VoxelVariableDataType.Discrete
    {
        //Renderer will be unique value
        var uvr = renderer as CIMVoxelUniqueValueRenderer;
        //access the renderer
    }
    
    Change The Visibility on a CIMVoxelColorUniqueValue class
    //Get the variable profile whose renderer will be changed
    var variable = voxelLayer.SelectedVariableProfile;
    
    //Check DataType
    if (variable.DataType != VoxelVariableDataType.Discrete)
        return;//must be Discrete to have a UV Renderer...
    
    var renderer = variable.Renderer as CIMVoxelUniqueValueRenderer;
    
    //A CIMVoxelUniqueValueRenderer consists of a collection of
    //CIMVoxelColorUniqueValue classes - one per discrete value
    //in the associated variable profile value array
    
    //Get the first class
    var classes = renderer.Classes.ToList();
    var unique_value_class = classes.First();
    //Set its visibility off
    unique_value_class.Visible = false;
    
    //Apply the change to the renderer
    renderer.Classes = classes.ToArray();
    //apply the changes
    variable.SetRenderer(renderer);
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMVoxelRenderer
             ArcGIS.Core.CIM.CIMVoxelUniqueValueRenderer

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also