ArcGIS Pro How to remove standalone table from contents

try
{
     var mapView = MapView.Active;
     if (mapView != null)
     {
          var map = mapView.Map;
          if (map != null)
          {
               foreach (StandaloneTable table in map.StandaloneTables)
               {
                    if (table.Name.Contains("K Factors"))
                     
QueuedTask.Run(()=>
{
  map.RemoveStandaloneTable(table);
}

               }
          }
     }
}
catch (Exception ex)
{
}

Guess you like

Origin www.cnblogs.com/gisoracle/p/12629458.html