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

In This Topic
    OpenViewAsync Method (KnowledgeGraphInvestigation)
    In This Topic
    Open a new view for this investigation.
    Syntax
    Public Function OpenViewAsync() As Task
    public Task OpenViewAsync()

    Return Value

    Remarks
    OpenViewAsync can be called from any thread. Internally, it does not use the QueuedTask. Ideally, this method is not awaited. However, if awaited, the returned task completes at the moment of the initial draw on the newly opened view.
    Example
    Open an existing investigation
    {
      // open an existing investigation
      var investigationProjectItems = Project.Current.GetItems<KnowledgeGraphInvestigationProjectItem>();
      var investigationProjectItem = investigationProjectItems.FirstOrDefault(ipi => ipi.Name.Equals("myInvestigation"));
      await QueuedTask.Run(() =>
      {
        KnowledgeGraphInvestigation investigation = investigationProjectItem.GetInvestigation();
        ProApp.Panes.CreateInvestigationPaneAsync(investigation);
    
    
        // or 
        investigation.OpenViewAsync();
      });
    
      // or 
      investigationProjectItem.OpenInvestigationPaneAsync();
    }
    Requirements

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

    ArcGIS Pro version: 3.5 or higher.
    See Also