RemoveByKey(IndexKey: Integer): Boolean;
IndexKey is the index key.
The RemoveByKey method removes the index, key of which is passed by the IndexKey parameter.
Sub Main;
Var
MB: IMetabase;
Object: IMetabaseObject;
Table: ITable;
Indexes: ITableIndexes;
Index: ITableIndex;
Begin
MB:=MetabaseClass.Active;
Object:=MB.ItemById("TABLE_1").Edit;
Table:=Object As ITable;
Indexes:=Table.Indexes;
Indexes.RemoveByKey(1);
Object.Save;
End Sub Main;
After executing the example the index with key 1 is removed in the table with the Table_1 identifier.
See also: