public ReadOnlyObservableCollection<StandaloneTable> StandaloneTables {get;}
Public ReadOnly Property StandaloneTables As ReadOnlyObservableCollection(Of StandaloneTable)
public ReadOnlyObservableCollection<StandaloneTable> StandaloneTables {get;}
Public ReadOnly Property StandaloneTables As ReadOnlyObservableCollection(Of StandaloneTable)
{
// these routines find a standalone table whether it is a child of the Map or a GroupLayer
var tblFind = map.FindStandaloneTable("CIMPATH=map/address_audit.xml");
IReadOnlyList<StandaloneTable> tables = map.FindStandaloneTables("addresses");
// this method finds a standalone table as a child of the map only
var table = map.StandaloneTables.FirstOrDefault(t => t.Name == "Addresses");
}
{
//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);
grp_layer.MoveStandaloneTable(grp_layer.StandaloneTables.First(), -1);
//move the last table in the map standalone tables to a group
//layer and place it at position 3. If 3 is invalid, the table
//will be placed at the bottom of the target container
//assumes the map has at least one standalone table...
var table = map.StandaloneTables.Last();
map.MoveStandaloneTable(table, grp_layer, 3);
//move a table from a group layer to the map standalone tables
//collection - assumes a table called 'Earthquakes' exists
var table2 = grp_layer.FindStandaloneTables("Earthquakes").First();
//move to the map container
map.MoveStandaloneTable(table2, 0);//will be placed at the top
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)