public void UnlockSection( LockedSectionDefinition lockedSectionDef )
Public Sub UnlockSection( _ ByVal lockedSectionDef As LockedSectionDefinition _ )
Parameters
- lockedSectionDef
- The definition of the section to unlock
public void UnlockSection( LockedSectionDefinition lockedSectionDef )
Public Sub UnlockSection( _ ByVal lockedSectionDef As LockedSectionDefinition _ )
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run |
| System.ArgumentNullException | Locked section is null |
| System.ArgumentException | Locked section not found in the collection of sections |
| System.InvalidOperationException | Section cannot be unlocked |
{
var mapView = MapView.Active;
await QueuedTask.Run(() =>
{
if (voxelLayer.Visualization != VoxelVisualization.Surface)
{
voxelLayer.SetVisualization(VoxelVisualization.Surface);
}
voxelLayer.SetSectionContainerExpanded(true);
voxelLayer.SetSectionContainerVisibility(true);
voxelLayer.SetLockedSectionContainerExpanded(true);
//get the selected locked section
var locked_section = mapView.GetSelectedLockedSections().FirstOrDefault();
if (locked_section == null)
{
locked_section = voxelLayer.GetLockedSections().FirstOrDefault();
}
if (locked_section == null)
{
return;
}
//Unlock the locked section (Deletes the locked section, creates
//a section)
if (voxelLayer.CanUnlockSection(locked_section))
{
voxelLayer.UnlockSection(locked_section);
}
});
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)