Creates a KnowledgeGraphLayerIDSet from a selection set.
This method must be called on the MCT. Use QueuedTask.Run.
Parameters
- selection
- A SelectionSet.
Return Value
A
KnowledgeGraphLayerIDSet. If no items in the selection are relevant to a knowledge graph, then null is returned.
Create an ID set from a SelectionSet
QueuedTask.Run(() =>
{
// get the selection set
var sSet = map.GetSelection();
// translate to an KnowledgeGraphLayerIDSet
// if the selectionset does not contain any KG entity or relationship records
// then idSet will be null
var idSet = KnowledgeGraphLayerIDSet.FromSelectionSet(sSet);
if (idSet == null)
return;
// you can use the idSet to create a new linkChart
// (using MapFactory.Instance.CreateLinkChart)
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.3 or higher.