ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / VoxelLayerCreationParams Class
Members Example Version

VoxelLayerCreationParams Class
Represents an object to initialize and create a voxel layer.
Object Model
VoxelLayerCreationParams ClassVoxelLayerCreationParams ClassLayer ClassLayer ClassLayer ClassLayer ClassLayer ClassCIMDataConnection ClassItem ClassCIMLayerDocument Class
Syntax
public class VoxelLayerCreationParams : LayerCreationParams 
Remarks
Use the static VoxelLayerCreationParams.Create() method overloads to create a VoxelLayerCreationParams instance.
Example
Create Voxel Layer
//Must be on the QueuedTask.Run()

//Must be a .NetCDF file for voxels
var url = @"C:\MyData\AirQuality_Redlands.nc";
var cim_connection = new CIMVoxelDataConnection()
{
    URI = url
};
//Create a VoxelLayerCreationParams
var createParams = VoxelLayerCreationParams.Create(cim_connection);
createParams.IsVisible = true;

//Can also just use the path directly...
//var createParams = VoxelLayerCreationParams.Create(url);

//Use VoxelLayerCreationParams to enumerate the variables within
//the voxel
var variables = createParams.Variables;
foreach (var variable in variables)
{
    var line = $"{variable.Variable}: {variable.DataType}, " +
       $"{variable.Description}, {variable.IsDefault}, {variable.IsSelected}";
    System.Diagnostics.Debug.WriteLine(line);
}
//Optional: set the default variable
createParams.SetDefaultVariable(variables.Last());

//Create the layer - map must be a local scene
VoxelLayer voxelLayer = LayerFactory.Instance.CreateLayer<VoxelLayer>(createParams, map);
Inheritance Hierarchy

System.Object
   ArcGIS.Desktop.Mapping.BaseCreationParams
      ArcGIS.Desktop.Mapping.MapMemberCreationParams
         ArcGIS.Desktop.Mapping.LayerCreationParams
            ArcGIS.Desktop.Mapping.VoxelLayerCreationParams

Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also