IMapLayerArrows.FindByIDs

Syntax

FindByIDs(OriginID: Integer; DestID: Integer): IMapArrow;

Parameters

OriginID. Identifier of the territory being the arrow start point

DestID. Identifier of the territory being the arrow end point.

Description

The FindByIDs method searches for an arrow by the specified identifiers of connected territories.

Example

Executing the example requires a regular report with the REPORT identifier with a map on the report sheet.

Add links to the Drawing, Map, Metabase, Report, and Tab system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    MetabaseObject: IMetabaseObject;
    Report: IPrxReport;
    Sheets: IPrxSheets;
    SheetT: IPrxTable;      
    Map: IMap;
    Arrows: IMapLayerArrows;
    Arrow: IMapArrow;
Begin
    Metabase := MetabaseClass.Active;
    MetabaseObject := Metabase.ItemById("REPORT").Edit;
    Report := MetabaseObject As IPrxReport;
    Sheets := Report.Sheets;
    SheetT := Sheets.Item(0As IPrxTable;
    Map := SheetT.TabSheet.Objects.Item(0).Extension As IMap;
    Arrows := Map.Layers.FindByName("Regions").Arrows;
    // Find arrow by specified identifiers of connected territories
    Arrow := Arrows.FindByIDs(98,46);
    Arrow.Pen := GxColor.FromName("Red"As IGxPen;
    // Find arrow by specified names of connected territories
    Arrow := Arrows.FindByNames("Amur region","Moscow region");
    Arrow.Pen := GxColor.FromName("Blue"As IGxPen;
    Report.MetabaseObject.Save;
End Sub UserProc;

After executing the example the found arrows color is set to the specified ones.

See also:

IMapLayerArrows