FindByNames(OriginID: String; DestID: String): IMapArrow;
OriginID - name of the territory being the arrow origin.
DestID - name of the territory being the arrow end point.
The FindByNames method searches for an arrow by the specified names of connected territories.
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: