IMapLayerArrows.GetIndex

Syntax

GetIndex(Value: IMapArrow): Integer;

Parameters

Value - arrow of the arrow collection.

Description

The GetIndex method returns the arrow index in the collection. The property is set to "-1" if the index is not found.

Example

Sub main;

Var

Metabase : IMetabase;

MetabaseObject: IMetabaseObject;

Report: IPrxReport;

Map : IMap;

Arrows : IMapLayerArrows;

Index : Integer;

Begin

Metabase := MetabaseClass.Active;

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

Report := MetabaseObject As IPrxReport;

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

Arrows := Map.Layers.FindByName("Regions").Arrows;

Index := Arrows.GetIndex(Arrows.FindByIDs(98,46));

Debug.WriteLine(Index);

Report.MetabaseObject.Save;

End Sub main;

After executing the example the arrow index is displayed in the console window. In this example, Report is an identifier of the regular report, which sheet contains the map.

See also:

IMapLayerArrows