ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LasDatasetLayer Class / GetSelectableClassCodes Method
Example

In This Topic
    GetSelectableClassCodes Method
    In This Topic
    Gets the class codes that are selectable. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function GetSelectableClassCodes() As IReadOnlyList(Of Integer)
    public IReadOnlyList<int> GetSelectableClassCodes()

    Return Value

    The list of selectable class codes. If an empty list is returned, then all class codes are selectable.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Selection Settings
    {
      // must be on MCT 
    
      // configure the LAS selection settings
    
      // set visible points and a specific set of classification codes selectable
      lasDatasetLayer.SetSelectVisiblePoints(true);
      lasDatasetLayer.SetSelectableClassCodes(new List<int>() { 3, 4, 5 });
    
      // this example sets all classification codes selectable
      lasDatasetLayer.SetSelectableClassCodes(new List<int>());
    
    
      // get the current LAS selection settings
      var canSelectVisible = lasDatasetLayer.GetSelectVisiblePoints();
      var selectableClassCodes = lasDatasetLayer.GetSelectableClassCodes();
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.6 or higher.
    See Also