ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / KnowledgeGraphMappingExtensions Class / SelectSpatialData Method
Example

In This Topic
    SelectSpatialData Method
    In This Topic
    Selects the existing set of spatial data in the knowledge graph layer on the link chart map view. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public static SelectionSet SelectSpatialData( 
       MapView mapView
    )
    Public Shared Function SelectSpatialData( _
       ByVal mapView As MapView _
    ) As SelectionSet

    Parameters

    mapView

    Return Value

    The set of spatial data as a SelectionSet
    Exceptions
    ExceptionDescription
    Map cannot be null.
    Map is not a link chart.
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Spatial data are entities with geometry and relationships that connect to two spatial entities.
    Example
    Non spatial data
    await QueuedTask.Run(() =>
    {
      // display non spatial data
      MapView.Active.SetShowNonSpatialData(true);
    
      // select the current set of non spatial data
      var selNonSpatial = MapView.Active.SelectNonSpatialData();
      
      // perform some action
    
      // select the current set of spatial data
      var selSpatial = MapView.Active.SelectSpatialData();
      
      // perform some other action
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also