ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / KnowledgeGraphMappingExtensions Class / ClearLinkChartContent Method
The link chart to clear content.
Example

In This Topic
    ClearLinkChartContent Method
    In This Topic
    Clears the link chart map content. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Shared Sub ClearLinkChartContent( _
       ByVal linkChart As Map _
    ) 
    public static void ClearLinkChartContent( 
       Map linkChart
    )

    Parameters

    linkChart
    The link chart to clear content.
    Exceptions
    ExceptionDescription
    Map is not a link chart or does not contain a Knowledge Graph layer.
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    You should use CanClearLinkChartContent prior to this method.
    Example
    Clear all content from a link chart
    {
      await QueuedTask.Run(() =>
      {
        //Get the link chart to be cleared of content
        var mapPanes = FrameworkApplication.Panes.OfType<IMapPane>().ToList();
        var mapPane = mapPanes.First(
          mp => mp.MapView.IsLinkChartView &&
          mp.MapView.Map.Name == "Acme Link Chart");
        var linkChartMap = mapPane.MapView.Map;
        //Clear all content from the link chart
        if (linkChartMap.CanClearLinkChartContent())
          linkChartMap.ClearLinkChartContent();
      });
    }
    Requirements

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

    ArcGIS Pro version: 3.7 or higher.
    See Also