ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / VoxelLayer Class / GetVolumes Method
Example

In This Topic
    GetVolumes Method
    In This Topic
    Gets the collection of volumes.
    Syntax
    public IList<VoxelVolume> GetVolumes()
    Public Function GetVolumes() As IList(Of VoxelVolume)
    Example
    Get the Voxel Volume Dimensions
    //At 2.x - var volume = voxelLayer.GetVolumeSize();
    //var x_max = volume.Item1;
    //var y_max = volume.Item2;
    //var z_max = volume.Item3;
    
    var x_max = voxelLayer.GetVolumes().Max(v => v.GetVolumeSize().X);
    var y_max = voxelLayer.GetVolumes().Max(v => v.GetVolumeSize().Y);
    var z_max = voxelLayer.GetVolumes().Max(v => v.GetVolumeSize().Z);
    
    //Get the dimensions of just one volume
    var dimensions = voxelLayer.GetVolumes().FirstOrDefault();
    //Get the dimensions of the volume associated with the selected variable
    var dimensions2 = voxelLayer.SelectedVariableProfile.Volume.GetVolumeSize();
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also