Name: String;
The Name property determines a map layer area name.
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;
MapShape: IVZMapChartShape;
Layer: IVZMapChartLayer;
ShapeId: String;
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");
// Select area
ShapeId := Layer.Shapes.Item(20).ShapeId;
MapShape := Layer.ShapeById(ShapeId);
// Select area on map
MapShape.Selected := True;
Debug.WriteLine("Name of map active area: " + MapShape.Name);
Debug.WriteLine("Map parent layer name: " + MapShape.ParentLayer.Name);
End Sub UserProc;
After executing the example, the console displays active area name and map parent layer name.
See also: