RenameQueryDefinition Method
Renames the
ArcGIS.Core.CIM.CIMKnowledgeGraphQueryDefinition with the specified name. This method must be called on the MCT. Use QueuedTask.Run.
Rename a Query Definition
{
// access the currently active knowledge graph investigation view
KnowledgeGraphInvestigationView activeView = KnowledgeGraphInvestigationView.Active;
KnowledgeGraphInvestigation investigation = activeView?.Investigation;
if (investigation != null)
{
await QueuedTask.Run(() =>
{
// rename the query definition
investigation.RenameQueryDefinition("Query1", "EntityQuery");
});
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)
ArcGIS Pro version: 3.7 or higher.