ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapMemberIDSet Class / FromDictionary Method / FromDictionary<T>(Dictionary<T,List<Int64>>) Method
The collection of mapMembers and their corresponding objectIDs
Example Version

FromDictionary<T>(Dictionary<T,List<Int64>>) Method
Creates a MapMemberIDSet object from the dictionary of records.
Syntax
public static MapMemberIDSet FromDictionary<T>( 
   Dictionary<T,List<long>> dict
)
where T: MapMember

Parameters

dict
The collection of mapMembers and their corresponding objectIDs

Type Parameters

T

Return Value

A MapMemberIDSet
Example
Assign a set of records as Root Nodes
await QueuedTask.Run(() =>
{
  var dict = new Dictionary<MapMember, List<long>>();
  dict.Add(entityLayer, oids);
  MapMemberIDSet mmIDSet = MapMemberIDSet.FromDictionary(dict);

  MapView.Active.SetRootNodes(mmIDSet);
});
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