ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / VoxelLayer Class / GetVariableProfiles Method
Example

In This Topic
    GetVariableProfiles Method (VoxelLayer)
    In This Topic
    Gets the collection of variable profiles.
    Syntax
    Public Function GetVariableProfiles() As IList(Of VoxelVariableProfile)
    public IList<VoxelVariableProfile> GetVariableProfiles()
    Example
    Change the Selected Variable Profile
    {
      // Note: call within QueuedTask.Run()
      {
        var profiles = voxelLayer.GetVariableProfiles();
        var sel_profile = voxelLayer.SelectedVariableProfile;
        //Select any profile as long as it is not the current selected variable
        var not_selected = profiles.Where(p => p.Variable != sel_profile.Variable).ToList();
        if (not_selected.Count() > 0)
        {
          voxelLayer.SetSelectedVariableProfile(not_selected.First());
        }
      }
    }
    Get the Variable Profiles
    {
    
      var variable_profiles = voxelLayer.GetVariableProfiles();
    }
    Get the Variable Renderer
    {
      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
      }
    }
    Check the MaxNumberofIsoSurfaces for a Variable
    {
      var variable = voxelLayer.GetVariableProfiles().First();
      var max = variable.MaxNumberOfIsosurfaces;
      if (max >= variable.GetIsosurfaces().Count)
      {
        //no more surfaces can be created on this variable
      }
    }
    Check a Variable's Datatype
    {
      var variable = voxelLayer.GetVariableProfiles().First();
      if (variable.DataType != VoxelVariableDataType.Continuous)
      {
        //No iso surfaces
        //Iso surface can only be created for VoxelVariableDataType.Continuous
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also