ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.DDL.Knowledge Namespace / KnowledgeGraphEntityTypeDescription Class / KnowledgeGraphEntityTypeDescription Constructor / KnowledgeGraphEntityTypeDescription Constructor(String)
The name to use for the description object
Example

In This Topic
    KnowledgeGraphEntityTypeDescription Constructor(String)
    In This Topic
    Construct a KnowledgeGraphEntityTypeDescription with the given name
    Syntax
    public KnowledgeGraphEntityTypeDescription( 
       string name
    )
    Public Function New( _
       ByVal name As String _
    )

    Parameters

    name
    The name to use for the description object
    Exceptions
    ExceptionDescription
    name is invalid
    Remarks
    The name will be used for a new entity type if the description is used for purposes of creation. Otherwise, it will be used to identify an existing entity type if the description is used for the purposes of modify or delete.
    Note: An ObjectID and GlobalID property description will automatically be added to the description object within the ArcGIS.Core.Data.DDL.SchemaBuilder
    Example
    Delete Entity and Relationship Types with SchemaBuilder
    await QueuedTask.Run(() =>
    {
      using (var kg = GetKnowledgeGraph())
      {
        if (kg == null)
          return;
    
        var entity_name = "PhoneCall";
        var relate_name = "WhoCalledWho";
    
        var entityDesc = new KnowledgeGraphEntityTypeDescription(entity_name);
        var relateDesc = new KnowledgeGraphRelationshipTypeDescription(relate_name);
    
        //Run the schema builder
        try
        {
          SchemaBuilder sb = new(kg);
          sb.Delete(entityDesc);
          sb.Delete(relateDesc);
          //Use the KnowledgeGraph extension method 'ApplySchemaEdits(...)'
          //to refresh the Pro UI
          if (!kg.ApplySchemaEdits(sb))
          {
            var err_msg = string.Join(",", sb.ErrorMessages.ToArray());
            System.Diagnostics.Debug.WriteLine($"Entity/Relate Delete error: {err_msg}");
          }
        }
        catch (Exception ex)
        {
          System.Diagnostics.Debug.WriteLine(ex.ToString());
        }
      }
    });
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.4 or higher.
    See Also