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

In This Topic
    FromDictionary<T>(Dictionary<T,List<Int64>>) Method
    In This Topic
    Creates a MapMemberIDSet object from the dictionary of records.
    Syntax
    public static MapMemberIDSet FromDictionary<T>( 
       Dictionary<T,List<long>> dict
    )
    where T: MapMember
    Public Overloads Shared Function FromDictionary(Of T As MapMember)( _
       ByVal dict As Dictionary(Of T,List(Of Long)) _
    ) As MapMemberIDSet

    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