ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / KnowledgeGraphLayerCreationParams Class / KnowledgeGraphLayerCreationParams Constructor / KnowledgeGraphLayerCreationParams Constructor(KnowledgeGraph)
A ArcGIS.Core.Data.Knowledge.KnowledgeGraph object.
Example

In This Topic
    KnowledgeGraphLayerCreationParams Constructor(KnowledgeGraph)
    In This Topic
    Creates a parameter object with a ArcGIS.Core.Data.Knowledge.KnowledgeGraph.
    Syntax
    public KnowledgeGraphLayerCreationParams( 
       KnowledgeGraph knowledgeGraph
    )
    Public Function New( _
       ByVal knowledgeGraph As KnowledgeGraph _
    )

    Parameters

    knowledgeGraph
    A ArcGIS.Core.Data.Knowledge.KnowledgeGraph object.
    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