Remove(Index: Integer);
Index. Arrow index in the collection.
The Remove method removes the arrow from the collection by the specified index.
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;
Arrow: IMapArrow;
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;
Arrow := Arrows.FindByIDs(98,46);
Index := Arrows.GetIndex(Arrow);
Arrows.Remove(Index);
Report.MetabaseObject.Save;
End Sub UserProc;
After executing the example the arrow is removed from the collection by the specified index.
See also: