GetIndex(Value: IMapArrow): Integer;
Value. Arrows collection arrow.
The GetIndex method returns the arrow index in the collection. The property is set to "-1" if the index is not found.
Executing the example requires a regular report with the REPORT identifier with a map on the report sheet.
Add links to the Map, Metabase, Report, Tab system assemblies.
Sub UserProc;
Var
Metabase: IMetabase;
MetabaseObject: IMetabaseObject;
Report: IPrxReport;
Sheets: IPrxSheets;
SheetT: IPrxTable;
Map: IMap;
Arrows: IMapLayerArrows;
Index: Integer;
Begin
Metabase := MetabaseClass.Active;
MetabaseObject := Metabase.ItemById("Report").Edit;
Report := MetabaseObject As IPrxReport;
Sheets := Report.Sheets;
SheetT := Sheets.Item(0) As IPrxTable;
Map := SheetT.TabSheet.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 UserProc;
After executing the example the console window displays the arrow index.
See also: