public IList<LockedSectionDefinition> GetLockedSections()
Public Function GetLockedSections() As IList(Of LockedSectionDefinition)
public IList<LockedSectionDefinition> GetLockedSections()
Public Function GetLockedSections() As IList(Of LockedSectionDefinition)
{
await QueuedTask.Run(() =>
{
if (voxelLayer.Visualization != VoxelVisualization.Surface)
{
voxelLayer.SetVisualization(VoxelVisualization.Surface);
}
voxelLayer.SetLockedSectionContainerExpanded(true);
voxelLayer.SetLockedSectionContainerVisibility(true);
var locked_sections = voxelLayer.GetLockedSections();
});
}
{
var my_locked_section_id = -1;
var locked_section = voxelLayer.GetLockedSections().FirstOrDefault();
var locked_section2 = voxelLayer.GetLockedSections()
.First(lsec => lsec.ID == my_locked_section_id);
}
{
await QueuedTask.Run(() =>
{
if (voxelLayer.Visualization != VoxelVisualization.Surface)
{
voxelLayer.SetVisualization(VoxelVisualization.Surface);
}
voxelLayer.SetLockedSectionContainerExpanded(true);
voxelLayer.SetLockedSectionContainerVisibility(true);
var locked_sections = voxelLayer.GetLockedSections().Where(ls => !ls.IsVisible);
//Make them visible
foreach (var locked_section in locked_sections)
{
locked_section.IsVisible = true;
//apply change
voxelLayer.UpdateSection(locked_section);
}
});
}
{
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);
}
});
}
{
await QueuedTask.Run(() =>
{
if (voxelLayer.GetLockedSections().Count() == 0)
{
return;
}
//Delete the last locked section from the collection of
//locked sections
voxelLayer.DeleteSection(voxelLayer.GetLockedSections().Last());
});
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)