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

In This Topic
    KnowledgeGraphRelationshipTypeDescription Constructor(String)
    In This Topic
    Construct a KnowledgeGraphRelationshipTypeDescription with the given name
    Syntax
    public KnowledgeGraphRelationshipTypeDescription( 
       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 relationship type if the description is used for purposes of creation. Otherwise, it will be used to identify an existing relationship 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. The underlying origin and destination entity id fields present on all relationship types will also be automatically be added.
    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