ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMVoxelColorUniqueValue Class / Visible Property
Example

In This Topic
    Visible Property (CIMVoxelColorUniqueValue)
    In This Topic
    Gets or sets a value indicating whether this class is visible.
    Syntax
    Public Property Visible As Boolean
    public bool Visible {get; set;}
    Example
    Change The Visibility on a CIMVoxelColorUniqueValue class
    {
      // Note: call within QueuedTask.Run()
      {
        //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);
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also