ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / KnowledgeGraphLayerCreationParams Class / KnowledgeGraphLayerCreationParams Constructor / KnowledgeGraphLayerCreationParams Constructor(Uri)
A System.Uri represents the path or url to a knowledge graph.
Example

In This Topic
    KnowledgeGraphLayerCreationParams Constructor(Uri)
    In This Topic
    Creates a parameter object with a System.Uri.
    Syntax
    public KnowledgeGraphLayerCreationParams( 
       Uri uri
    )
    Public Function New( _
       ByVal uri As Uri _
    )

    Parameters

    uri
    A System.Uri represents the path or url to a knowledge graph.
    Remarks

    Some sample paths to:

    A uri to a knowledge graph. https://someServer.domain.com/server/rest/services/Hosted/SomeKG/KnowledgeGraphServer

    Example
    Create a KG Layer containing all Entity and Relate types
    QueuedTask.Run(() =>
    {
      //With a connection to a KG established or source uri available...
      //Create a KnowledgeGraphLayerCreationParams
      var kg_params = new KnowledgeGraphLayerCreationParams(kg)
      {
        Name = "KG_With_All_Types",
        IsVisible = false
      };
      //Or
      var kg_params2 = new KnowledgeGraphLayerCreationParams(new Uri(url))
      {
        Name = "KG_With_All_Types",
        IsVisible = false
      };
      //Call layer factory with map or group layer container. 
      //A KG layer containing a feature layer and/or standalone table per
      //entity and relate type (except provenance) is created
      var kg_layer = LayerFactory.Instance.CreateLayer<KnowledgeGraphLayer>(
          kg_params, map);
    
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also