ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping.Voxel Namespace / VoxelVolume Class / DeleteSection Method
The definition of the section to delete.
Example

In This Topic
    DeleteSection Method (VoxelVolume)
    In This Topic
    Delete the specified section. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void DeleteSection( 
       SectionDefinition sectionDef
    )
    Public Sub DeleteSection( _
       ByVal sectionDef As SectionDefinition _
    ) 

    Parameters

    sectionDef
    The definition of the section to delete.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run
    Invalid section definition specified
    Section is null
    Section not found in the collection of sections
    Example
    Delete Sections
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    //Use the SelectedVariableProfile to get the sections
    //via its associated volume
    var volume = voxelLayer.SelectedVariableProfile.Volume;
    
    //At 2.x - foreach (var section in voxelLayer.GetSections())
    //                        voxelLayer.DeleteSection(section);
    foreach (var section in volume.GetSections())
        volume.DeleteSection(section);
    
    //optional...
    if (voxelLayer.Visualization != VoxelVisualization.Volume)
        voxelLayer.SetVisualization(VoxelVisualization.Volume);
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also