ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.KnowledgeGraph Namespace / KnowledgeGraphInvestigation Class / GetAllQueryDefinitions Method
Example

In This Topic
    GetAllQueryDefinitions Method
    In This Topic
    Gets all the ArcGIS.Core.CIM.CIMKnowledgeGraphQueryDefinitions for this investigation. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    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");
        });
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.7 or higher.
    See Also