public void RemoveStandaloneTable( StandaloneTable table )
Public Sub RemoveStandaloneTable( _ ByVal table As StandaloneTable _ )
Parameters
- table
- The StandaloneTable to remove
public void RemoveStandaloneTable( StandaloneTable table )
Public Sub RemoveStandaloneTable( _ ByVal table As StandaloneTable _ )
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
//get the first group layer that has at least one table var grp_layer = MapView.Active.Map.GetLayersAsFlattenedList() .OfType<GroupLayer>().First(g => g.StandaloneTables.Count > 0); var map = MapView.Active.Map;//assumes non-null QueuedTask.Run(() => { //get the tables from the map container var tables = map.GetStandaloneTablesAsFlattenedList(); //delete the first... if (tables.Count() > 0) { map.RemoveStandaloneTable(tables.First()); //or delete all of them map.RemoveStandaloneTables(tables); } //delete a table from a group layer //assumes it has at least one table... grp_layer.RemoveStandaloneTable(grp_layer.StandaloneTables.First()); });
Target Platforms: Windows 11, Windows 10