ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.Knowledge.Analytics Namespace / KnowledgeGraphCentralityResults Class / NamedTypes Property
Example

In This Topic
    NamedTypes Property
    In This Topic
    Gets the list of entity named types used in the centrality analysis.
    Syntax
    Public ReadOnly Property NamedTypes As List(Of String)
    public List<string> NamedTypes {get;}
    Example
    Output Centrality Results
    {
      //using ArcGIS.Core.Data.Knowledge.Extensions;
    
      await QueuedTask.Run(() =>
      {
        ///var kgConfig = ...;
        //var kgSubgraph = ...;
        //var measures = ...;
        //using(var kg = ...) {
        var results = kg.ComputeCentrality(kgConfig, kgSubgraph, measures);
        //loop through each (entity) named type (relates are never included in results)
        foreach (var named_type in results.NamedTypes)
        {
          //Get the entity uids for each named type
          foreach (var uid in results.GetUidsForNamedType(named_type))
          {
            //Get the scores for each uid via the [] indexer on "Scores"
            var scores = results.Scores[uid];
            //There is one score per measure in the input measures array
            //Note: results.Scores.Measures is also provided for convenience...
            //for (int m = 0; m < results.Scores.Measures.Length; m++)
            for (int m = 0; m < measures.Length; m++)
            {
              var score = scores[m];//score for the given measure
                                    //TODO - use measure score
    
            }
          }
        }
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.6 or higher.
    See Also