public sealed class KnowledgeGraph : ArcGIS.Core.Data.Datastore, System.IDisposable
Public NotInheritable Class KnowledgeGraph Inherits ArcGIS.Core.Data.Datastore Implements System.IDisposable
public sealed class KnowledgeGraph : ArcGIS.Core.Data.Datastore, System.IDisposable
Public NotInheritable Class KnowledgeGraph Inherits ArcGIS.Core.Data.Datastore Implements System.IDisposable
var kgLayer = MapView.Active.Map.GetLayersAsFlattenedList() .OfType<KnowledgeGraphLayer>().FirstOrDefault(); //KnowledgeGraphLayer is a composite layer - get the first //child feature layer or standalone table QueuedTask.Run(() => { var featlayer = kgLayer?.GetLayersAsFlattenedList()? .OfType<FeatureLayer>()?.FirstOrDefault(); KnowledgeGraph kg = null; if (featlayer != null) { using (var fc = featlayer.GetFeatureClass()) kg = fc.GetDatastore() as KnowledgeGraph; //TODO use KnowledgeGraph } else { //try standalone table var stbl = kgLayer?.GetStandaloneTablesAsFlattenedList()? .FirstOrDefault(); if (stbl != null) { using (var tbl = stbl.GetTable()) kg = tbl.GetDatastore() as KnowledgeGraph; //TODO use KnowledgeGraph } } });
System.Object
ArcGIS.Core.CoreObjectsBase
ArcGIS.Core.Data.Datastore
ArcGIS.Core.Data.Knowledge.KnowledgeGraph
Target Platforms: Windows 11, Windows 10