ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.KnowledgeGraph Namespace / KnowledgeGraphInvestigationView Class / SetSelectedRecords Method
The set of records to select. A null or empty idSet with a method of ArcGIS.Desktop.Mapping.SelectionCombinationMethod.New will clear the selected records.
Combination method used in the selection operation.
Example

In This Topic
    SetSelectedRecords Method
    In This Topic
    Sets the selected records. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    idSet
    The set of records to select. A null or empty idSet with a method of ArcGIS.Desktop.Mapping.SelectionCombinationMethod.New will clear the selected records.
    method
    Combination method used in the selection operation.

    Return Value

    A ArcGIS.Desktop.Mapping.KnowledgeGraphLayerIDSet representing the selected records.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Select records in an investigation view
    // get the active investigation view 
    var iv = KnowledgeGraphInvestigationView.Active;
    var serviceUri = iv.Investigation.ServiceUri;
    
    // build a dictionary of records
    var dict = new Dictionary<string, List<long>>();
    //Each entry consists of the type name and corresponding lists of ids
    dict.Add(first_entity, new List<long>() { 1, 5, 18, 36, 78 });
    
    //Create the id set...
    var idSet = KnowledgeGraphLayerIDSet.FromDictionary(new Uri(serviceUri), dict);
    
    // select the records on the investigation view
    iv.SetSelectedRecords(idSet, SelectionCombinationMethod.New);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also