Gets a dictionary, with the keys being the names of the entity types
in the data model, and the values being objects containing information
about each entity type.
This method must be called on the MCT. Use QueuedTask.Run.
Get KnowledgeGraph Entity Types
QueuedTask.Run(() =>
{
//Create a connection properties
var kg_props =
new KnowledgeGraphConnectionProperties(new Uri(url));
using (var kg = new KnowledgeGraph(kg_props))
{
//Get the KnowledgeGraph Data Model
using (var kg_dm = kg.GetDataModel())
{
var dict_types = kg_dm.GetEntityTypes();
foreach (var kvp in dict_types)
{
var entity_type = kvp.Value;
var role = entity_type.GetRole();
//note "name" will be the same name as the corresponding
//feature class or table in the KG's relational gdb model
var name = entity_type.GetName();
//etc
}
}
}
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.2 or higher.