ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping.Voxel Namespace / SectionDefinition Class
Members Example

In This Topic
    SectionDefinition Class
    In This Topic
    Represents the definition of a section. Refer to ArcGIS.Desktop.Mapping.VoxelLayer
    Object Model
    SectionDefinition ClassSectionDefinition ClassVoxelLayer ClassCoordinate3D StructureVoxelVolume ClassCoordinate3D Structure
    Syntax
    public class SectionDefinition 
    Public Class SectionDefinition 
    Remarks
    A section is a snapshot of data in the voxel that creates a plane. The plane is defined by a position and a direction defined by a normal unit vector. Refer to Voxel layer sections
    Example
    Get/Set Selected Voxel Assets from the TOC
    var surfaces = MapView.Active.GetSelectedIsosurfaces();
    //set selected w/ MapView.Active.SelectVoxelIsosurface(isoSurface)
    var slices = MapView.Active.GetSelectedSlices();
    //set selected w/ MapView.Active.SelectVoxelSlice(slice)
    var sections = MapView.Active.GetSelectedSections();
    //set selected w/ MapView.Active.SelectVoxelSection(section)
    var locked_sections = MapView.Active.GetSelectedLockedSections();
    //set selected w/ MapView.Active.SelectVoxelLockedSection(locked_section)
    
    Get a Section
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    //At 2.x -
    //var section = voxelLayer.GetSections().FirstOrDefault();
    //var section2 = voxelLayer.GetSections().First(sec => sec.Id == my_section_id);
    
    //Use the SelectedVariableProfile to get the sections currently in the TOC
    //via its associated volume
    var volume = voxelLayer.SelectedVariableProfile.Volume;
    
    var section = volume.GetSections().FirstOrDefault();
    var section2 = volume.GetSections().First(sec => sec.ID == my_section_id);
    
    Get the Current Collection of Sections
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    if (voxelLayer.Visualization != VoxelVisualization.Surface)
        voxelLayer.SetVisualization(VoxelVisualization.Surface);
    voxelLayer.SetSectionContainerExpanded(true);
    voxelLayer.SetSectionContainerVisibility(true);
    
    //At 2.x - var sections = voxelLayer.GetSections();
    
    //Use the SelectedVariableProfile to get the sections currently in the TOC
    //via its associated volume
    var volume = voxelLayer.SelectedVariableProfile.Volume;
    var sections = volume.GetSections();
    
    
    Get the Selected Section in TOC
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    var section = MapView.Active?.GetSelectedSections()?.FirstOrDefault();
    if (section != null)
    {
    
    }
    
    Get Voxel Layer for the Selected Section in TOC
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    VoxelLayer voxelLayer = null;
    var section = MapView.Active?.GetSelectedSections()?.FirstOrDefault();
    if (section != null)
    {
        voxelLayer = section.Layer;
        //TODO - use the layer
    }
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.Voxel.SectionDefinition

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also