ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureSceneLayer Class / HideSelectedFeatures Method
Example

In This Topic
    HideSelectedFeatures Method
    In This Topic
    Creates an exclusion set based on the currently selected features. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub HideSelectedFeatures() 
    public void HideSelectedFeatures()
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Features in the exclusion set will be hidden. See also ShowHiddenFeatures
    Example
    Hide Selected features and Show Hidden features
    {
      if (featSceneLayer.HasAssociatedFeatureService)
        return;//Search and Select not supported
    
      // Note: call within QueuedTask.Run()
      {
        QueryFilter qf = new QueryFilter()
        {
          ObjectIDs = new List<long>() { 6069, 6070, 6071 },
          SubFields = "*"
        };
        featSceneLayer.Select(qf, SelectionCombinationMethod.New);
    
        featSceneLayer.HideSelectedFeatures();
        var selectionCount = featSceneLayer.SelectionCount;
    
        featSceneLayer.ShowHiddenFeatures();
        selectionCount = featSceneLayer.SelectionCount;
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also