AllKeys: IVZStringArray;
The AllKeys property returns the array of map layer area keys.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. The report contains a map with areas and the identifier of the the Regions layer.
Add links to the Metabase, Express, Visualizators system assemblies.
Sub UserProc;
Var
Metabase: IMetabase;
EaxAnalyzer: IEaxAnalyzer;
EMap: IVZMapChart;
Layer: IVZMapChartLayer;
Shapes: IVZMapChartShapes;
Shape: IVZMapChartShape;
i, c: Integer;
Begin
// Get repository
Metabase := MetabaseClass.Active;
// Get express report
EaxAnalyzer := Metabase.ItemById("EXPRESS").Bind As IEaxAnalyzer;
// Get express report map as visualizer
EMap := EaxAnalyzer.MapChart.MapChart;
// Get map layer
Layer := EMap.RootLayer.LayerById("Regions");
// Get areas
Shapes := Layer.Shapes;
c := Shapes.Count;
For i := 0 To c - 1 Do
Shape := Shapes.ItemByKey(Shapes.AllKeys.Item(i));
Debug.WriteLine(Shape.Name + " (ID=" + Shape.ShapeId + ')');
End For;
End Sub UserProc;
After executing the example the development environment console displays names and identifiers of all areas of the Regions layer.
See also: