ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.Knowledge Namespace / KnowledgeGraphNamedObjectType Class / GetAliasName Method
Example

In This Topic
    GetAliasName Method (KnowledgeGraphNamedObjectType)
    In This Topic
    Gets the alias name for this named object type. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function GetAliasName() As String
    public string GetAliasName()

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Get KnowledgeGraph Entity Types
    {
      await QueuedTask.Run(() =>
      {
        //Create a connection properties
        var kg_props =
            new KnowledgeGraphConnectionProperties(new Uri(url));
        using (var kg = new KnowledgeGraph(kg_props))
        {
          //Get the KnowledgeGraph Data Model
          using (var kg_dm = kg.GetDataModel())
          {
            var dict_types = kg_dm.GetEntityTypes();
    
            foreach (var kvp in dict_types)
            {
              var entity_type = kvp.Value;
              var role = entity_type.GetRole();
              //note "name" will be the same name as the corresponding
              //feature class or table in the KG's relational gdb model
              var name = entity_type.GetName();
              var alias = entity_type.GetAliasName();
              var objectIDPropertyName = entity_type.GetObjectIDPropertyName();
              //etc
    
            }
    
          }
        }
      });
    }
    Requirements

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

    ArcGIS Pro version: 3.2 or higher.
    See Also