IMapLayerArrows.FindByNames

Syntax

FindByNames(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 FindByNames method searches for an arrow by the specified names of connected territories.

Example

Sub main;

Var

Metabase : IMetabase;

MetabaseObject: IMetabaseObject;

Report: IPrxReport;

Map : IMap;

Arrow : IMapArrow;

Begin

Metabase := MetabaseClass.Active;

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

Report := MetabaseObject As IPrxReport;

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

Arrow := Map.Layers.FindByName("Regions").Arrows.FindByNames("Amur region","Moscow region");

Arrow.Color := GxColor.FromName("Blue");

Report.MetabaseObject.Save;

End Sub main;

After executing the example the found arrow color is set to the specified one. In this example, Report is an identifier of the regular report, which sheet contains the map.

See also:

IMapLayerArrows