ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / KnowledgeGraphMappingExtensions Class / SelectRootNodes Method
The set of root nodes. If the set is empty, then the root nodes and the selection are cleared.
Example Version

SelectRootNodes Method
Sets AND selects the root nodes for the link chart map view. Use an empty set of rootNodes to clear the existing set of root nodes and the selection. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static SelectionSet SelectRootNodes( 
   MapView mapView,
   MapMemberIDSet rootNodes
)

Parameters

mapView
rootNodes
The set of root nodes. If the set is empty, then the root nodes and the selection are cleared.

Return Value

The set of root nodes as a SelectionSet
Exceptions
ExceptionDescription
Map cannot be null.
rootNodes cannot be null.
Map is not a link chart.
This method or property must be called within the lambda passed to QueuedTask.Run.
Example
Define and select a set of records as Root Nodes
await QueuedTask.Run(() =>
{
  var dict = new Dictionary<MapMember, List<long>>();
  dict.Add(entityLayer, oids);
  dict.Add(entityLayer2, oids2);
  MapMemberIDSet mmIDSet = MapMemberIDSet.FromDictionary(dict);

  MapView.Active.SelectRootNodes(mmIDSet);
});
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also