ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping.Voxel Namespace / VoxelVariableProfile Class / DeleteIsosurface Method
The definition of the isosurface to delete.
Example

In This Topic
    DeleteIsosurface Method
    In This Topic
    Delete the specified isosurface. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub DeleteIsosurface( _
       ByVal isosurfaceDef As IsosurfaceDefinition _
    ) 
    public void DeleteIsosurface( 
       IsosurfaceDefinition isosurfaceDef
    )

    Parameters

    isosurfaceDef
    The definition of the isosurface to delete.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Isosurface not found in the collection of isosurfaces.
    Example
    Delete Isosurfaces
    {
      // Note: call within QueuedTask.Run()
      {
        var variable = voxelLayer.SelectedVariableProfile;
    
        //delete the last surface
        var last_surface = variable.GetIsosurfaces().LastOrDefault();
    
        if (last_surface != null)
        {
          variable.DeleteIsosurface(last_surface);
        }
    
        //delete all the surfaces
        foreach (var surface in variable.GetIsosurfaces())
          variable.DeleteIsosurface(surface);
    
        //Optional - set visualization back to Volume
        if (variable.GetIsosurfaces().Count() == 0)
        {
          voxelLayer.SetVisualization(VoxelVisualization.Volume);
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also