ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / KnowledgeGraphMappingExtensions Class / SelectAllRootNodes Method
Example Version

SelectAllRootNodes Method
Selects the existing set of root nodes defined on the link chart mapview. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static SelectionSet SelectAllRootNodes( 
   MapView mapView
)

Parameters

mapView

Return Value

The set of root nodes 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.
Example
Select the records that are Root Node
await QueuedTask.Run(() =>
{
  var mapSel = MapView.Active.SelectAllRootNodes();


  // this is the same as 
  MapMemberIDSet rootNodes = MapView.Active.GetRootNodes();
  SelectionSet selSet = SelectionSet.FromMapMemberIDSet(rootNodes);
  MapView.Active.Map.SetSelection(selSet);
});
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also