ArcGIS Pro 3.7 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 Sub DeleteSection( _
       ByVal sectionDef As SectionDefinition _
    ) 
    public void DeleteSection( 
       SectionDefinition sectionDef
    )

    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
    {
      // Note: call within QueuedTask.Run()
      {
        //Use the SelectedVariableProfile to get the sections
        //via its associated volume
        var volume = voxelLayer.SelectedVariableProfile.Volume;
    
        foreach (var section in volume.GetSections())
          volume.DeleteSection(section);
    
        //optional...
        if (voxelLayer.Visualization != VoxelVisualization.Volume)
          voxelLayer.SetVisualization(VoxelVisualization.Volume);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also