IMapLayerArrows.CreateByNames

Syntax

CreateByNames(OriginID: String; DestID: String): IMapArrow;

Parameters

OriginID - name of the territory being the arrow origin.

DestID - name of the territory being the arrow end point.

Description

The CreateByNames method adds an arrow to the collection based on the specified names of connected territories.

Example

Sub main;

Var

Metabase : IMetabase;

MetabaseObject: IMetabaseObject;

Report: IPrxReport;

Map : IMap;

Begin

Metabase := MetabaseClass.Active;

MetabaseObject := Metabase.ItemById("Report").Edit;

Report := MetabaseObject As IPrxReport;

Map := Report.ActiveSheet.Table.Objects.Item(0).Extension As IMap;

Map.Layers.FindByName("Regions").Arrows.CreateByNames("Amur region","Moscow region");

Report.MetabaseObject.Save;

End Sub main;

After executing the example an arrow is created and added to the collection, the arrow is displayed on the map. In this example, Report is an identifier of the regular report, which sheet contains the map.

See also:

IMapLayerArrows