ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping.Voxel Namespace / SectionDefinition Class / CreateHorizontalSectionDefinition Method
Example

In This Topic
    CreateHorizontalSectionDefinition Method
    In This Topic
    Factory method for creating a horizontal section
    Syntax
    Public Shared Function CreateHorizontalSectionDefinition() As SectionDefinition
    public static SectionDefinition CreateHorizontalSectionDefinition()

    Return Value

    SectionDefinition where the section plane is horizontal
    Example
    Create a Horizontal Section
    {
      // Note: call within QueuedTask.Run()
      {
        if (voxelLayer.Visualization != VoxelVisualization.Surface)
          voxelLayer.SetVisualization(VoxelVisualization.Surface);
        voxelLayer.SetSectionContainerExpanded(true);
        voxelLayer.SetSectionContainerVisibility(true);
    
        //Create a section that cuts the volume in two on the horizontal plane
    
        //Use the SelectedVariableProfile to get the sections
        //via its associated volume
        var volume = voxelLayer.SelectedVariableProfile.Volume;
        var volumeSize = volume.GetVolumeSize();
    
        //Or use normal (0, 0, 1) or (0, 0, -1)...
        var horz_section = SectionDefinition.CreateHorizontalSectionDefinition();
    
        horz_section.Name = "Horizontal Section";
        horz_section.IsVisible = true;
        horz_section.VoxelPosition = new Coordinate3D(volumeSize.X / 2, volumeSize.Y / 2, volumeSize.Z / 2);
    
        volume.CreateSection(horz_section);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also