ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.KnowledgeGraph Namespace / KnowledgeGraphInvestigation Class / DeleteQueryDefinition Method
The name of the query definition to delete from the investigation.This corresponds to ArcGIS.Core.CIM.CIMKnowledgeGraphQueryDefinition.Name.
Example

In This Topic
    DeleteQueryDefinition Method
    In This Topic
    Deletes the ArcGIS.Core.CIM.CIMKnowledgeGraphQueryDefinition with the specified name from this investigation. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub DeleteQueryDefinition( _
       ByVal queryDefinitionName As String _
    ) 
    public void DeleteQueryDefinition( 
       string queryDefinitionName
    )

    Parameters

    queryDefinitionName
    The name of the query definition to delete from the investigation.This corresponds to ArcGIS.Core.CIM.CIMKnowledgeGraphQueryDefinition.Name.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    The queryDefinitionName is null or empty.
    The queryDefinitionName does not exist in the investigation.
    Example
    Delete 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(() =>
        {
          // delete the query definition
          investigation.DeleteQueryDefinition("Query1");
        });
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.7 or higher.
    See Also