CreateHorizontalSectionDefinition Method
Return Value
SectionDefinition where the section plane is horizontal
Create a Horizontal Section
//var voxelLayer = ... ;
//Must be on the 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
//At 2.x - var volumeSize = voxelLayer.GetVolumeSize();
//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);
//At 2.x - voxelLayer.CreateSection(horz_section);
volume.CreateSection(horz_section);
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.