IPrxAssemblies.Add

Syntax

Add(Module: IMetabaseObjectDescriptor): Integer;

Parameters

Module - description of a development environment object that is to be included into the list of objects used in the regular report.

Description

The Add method connects a development environment object to the regular report and returns index of the connected object in the list.

Comments

The list of available objects includes all units, forms, assemblies and .NET assemblies of the repository.

Example

Executing the example requires that the repository contains a regular report with the Report_1 identifier and a unit with the Module_1 identifier.

Sub Main;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    MBDesc: IMetabaseObjectDescriptor;
    Report: IPrxReport;
    Assemb: IPrxAssemblies;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    MBDesc := MB.ItemById("Module_1");
    MObj := MB.ItemById("Report").Edit;
    Report := MObj As IPrxReport;
    Assemb := Report.Assemblies;
    i := Assemb.Add(MBDesc);
    MObj.Save;
End Sub Main;

After executing the example this unit is connected to the repository and the "i" variable contains index of the unit in the list.

See also:

IPrxAssemblies