ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping.Voxel Namespace / VoxelVolume Class / UpdateSection Method
The definition of the section to update.
Example

In This Topic
    UpdateSection Method (VoxelVolume)
    In This Topic
    Updates the section identified by the input SectionDefinition. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub UpdateSection( _
       ByVal sectionDef As SectionDefinition _
    ) 
    public void UpdateSection( 
       SectionDefinition sectionDef
    )

    Parameters

    sectionDef
    The definition of the section to update.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run
    Invalid section definition specified
    Section not found in the collection of sections
    Section is null
    Example
    Update Section Orientation and Tilt
    {
      // Note: call within QueuedTask.Run()
      {
        if (voxelLayer.Visualization != VoxelVisualization.Surface)
          voxelLayer.SetVisualization(VoxelVisualization.Surface);
        voxelLayer.SetSectionContainerExpanded(true);
        voxelLayer.SetSectionContainerVisibility(true);
    
        //Use the SelectedVariableProfile to get the sections
        //via its associated volume
        var volume = voxelLayer.SelectedVariableProfile.Volume;
    
        foreach (var section in volume.GetSections())
        {
          //set each normal to 45.0 orientation and tilt
          section.Normal = voxelLayer.GetNormal(45.0, 45.0);
          //apply the change
          volume.UpdateSection(section);
        }
      }
    }
    Update Section Visibility
    {
      // Note: call within QueuedTask.Run()
      {
        if (voxelLayer.Visualization != VoxelVisualization.Surface)
          voxelLayer.SetVisualization(VoxelVisualization.Surface);
        voxelLayer.SetSectionContainerExpanded(true);
        voxelLayer.SetSectionContainerVisibility(true);
    
        //Use the SelectedVariableProfile to get the sections
        //via its associated volume
        var volume = voxelLayer.SelectedVariableProfile.Volume;
        var sections = volume.GetSections().Where(s => !s.IsVisible);
    
        //Make them all visible
        foreach (var section in sections)
        {
          section.IsVisible = true;
          //apply the change
          volume.UpdateSection(section);
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also