IMetabaseUpdateObject.ReadUpdate

Fore Syntax

ReadUpdate(Update: IMetabaseUpdate; [Mode: UpdateLoadMode = 0]);

Fore.NET Syntax

ReadUpdate(Update: Prognoz.Platform.Interop.Metabase.IMetabaseUpdate; Mode: Prognoz.Platform.Interop.Metabase.UpdateLoadMode);

Parameters

Update. Update that is opened.

Mode. Mode of adding the objects to the update. The parameter is not mandatory for Fore, the UpdateLoadMode.Replace value is passed by default: if the created update contains the objects, they are replaced by the objects from the update that is opened.

Description

The ReadUpdate method opens update from the repository.

Fore Example

To execute the example, add a link to the Metabase system assembly. Update with the ObjPefx identifier should exist in the repository.

Sub UserProc;
Var
    MB: IMetabase;
    Update: IMetabaseUpdate;
    UpdateObj: IMetabaseUpdateObject;
Begin
    MB := MetabaseClass.Active;
    Update := MB.CreateUpdate;
    UpdateObj := MB.ItemById("ObjPefx").Bind As IMetabaseUpdateObject;
    UpdateObj.ReadUpdate(Update);
    Update.SaveToFileNF("C:\Update.pefx");
End Sub UserProc;

After executing this example the update from the repository is opened and saved into the c:\Update.pefx file.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Update: IMetabaseUpdate;
    UpdateObj: IMetabaseUpdateObject;
Begin
    MB := Params.Metabase;
    Update := MB.CreateUpdate();
    UpdateObj := MB.ItemById["ObjPefx"].Bind() As IMetabaseUpdateObject;
    UpdateObj.ReadUpdate(Update, UpdateLoadMode.ulmReplace);
    Update.SaveToFileNF("C:\Update.pefx");
End Sub

After executing this example the update from the repository is opened and saved into the C:\Update.pefx file.

See also:

IMetabaseUpdateObject