Public Sub UnlockSection( _ ByVal lockedSectionDef As LockedSectionDefinition _ )
public void UnlockSection( LockedSectionDefinition lockedSectionDef )
Parameters
- lockedSectionDef
- The definition of the section to unlock
Public Sub UnlockSection( _ ByVal lockedSectionDef As LockedSectionDefinition _ )
public void UnlockSection( LockedSectionDefinition lockedSectionDef )
| 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 |
{
// Note: call within 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.Active.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)