Remove(Index: Integer): Boolean;
Index - index of a unit or a form.
The Remove method deletes a connected object and returns True if the object is successfully deleted.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Assemb: IPrxAssemblies;
s: String;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
Assemb := Report.Assemblies;
If Assemb.Remove(1) Then
s := "Remove";
Else
s := "Don't remove";
End If;
MObj.Save;
End Sub Main;
After executing the example the "s" variable contains Yes if the second object in the list is successfully deleted. The identifier of the regular report - Report.
See also: