GetQueryDefinition Method
Gets the
ArcGIS.Core.CIM.CIMKnowledgeGraphQueryDefinition with the specified name. This method must be called on the MCT. Use QueuedTask.Run.
Parameters
- queryDefinitionName
- The name of the query definition to retrieve. This corresponds to ArcGIS.Core.CIM.CIMKnowledgeGraphQueryDefinition.Name.
Return Value
A
ArcGIS.Core.CIM.CIMKnowledgeGraphQueryDefinition. If no query definition matching the name is found, null is returned. Note that this method is case sensitive.
Retrieve Investigation Query Definitions
{
// access the currently active knowledge graph investigation view
KnowledgeGraphInvestigationView activeView = KnowledgeGraphInvestigationView.Active;
KnowledgeGraphInvestigation investigation = activeView?.Investigation;
if (investigation != null)
{
await QueuedTask.Run(() =>
{
// get all the query defintiions
var queries = investigation.GetAllQueryDefinitions();
// get a specific query definition
var myQuery = investigation.GetQueryDefinition("Query1");
});
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)
ArcGIS Pro version: 3.7 or higher.