ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.Knowledge Namespace / KnowledgeGraphExtensions Class / GetIsKnowledgeGraphDataset Method
The dataset to check
Example

In This Topic
    GetIsKnowledgeGraphDataset Method
    In This Topic
    Gets whether the dataset is a knowledge graph dataset or not. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public static bool GetIsKnowledgeGraphDataset( 
       Dataset dataSet
    )
    Public Shared Function GetIsKnowledgeGraphDataset( _
       ByVal dataSet As Dataset _
    ) As Boolean

    Parameters

    dataSet
    The dataset to check

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Is a dataset part of a Knowledge Graph
    var featureLyer = MapView.Active.Map.GetLayersAsFlattenedList()
                    .OfType<FeatureLayer>().FirstOrDefault();
    if (featureLyer == null)
      return;
    
    QueuedTask.Run(() =>
    {
      //Get the feature class
      var fc = featureLyer.GetFeatureClass();
    
      // is it part of a KnowledgeGraph?
      var isPartOfKG = fc.GetIsKnowledgeGraphDataset();
      
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.3 or higher.
    See Also