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

In This Topic
    FromDictionary<T>(Dictionary<T,HashSet<Int64>>) Method
    In This Topic
    Creates a MapMemberIDSet object from the dictionary of records.
    Syntax
    Public Overloads Shared Function FromDictionary(Of T As MapMember)( _
       ByVal dict As Dictionary(Of T,HashSet(Of Long)) _
    ) As MapMemberIDSet
    public static MapMemberIDSet FromDictionary<T>( 
       Dictionary<T,HashSet<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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.7 or higher.
    See Also