IMetabaseUpdate.FindSpecialObjectsNode

Syntax

FindSpecialObjectsNode: IMetabaseUpdateFindSpecialObjectsNode;

Description

The FindSpecialObjectsNode method searches for the object that determines special object update options.

Comments

If the object is not found, the empty value is returned and the object is not created.

To create a new object that determines special object update options, use the IMetabaseUpdate.SpecialObjectsNode property.

Example

Executing the example requires the Update.pefx update file.

Add a link to the Metabase system assembly.

Sub Main;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Update: IMetabaseUpdate;
    SpecialObjNode: IMetabaseUpdateSpecialObjectsNode;
Begin
    // Get access to repository
    MB := MetabaseClass.Active;
    MS := MB.Security;
    Update := Mb.CreateUpdate;
    Update.LoadFromFileNF("C:\Update.pefx");
    // Check if update contains special object
    SpecialObjNode := Update.FindSpecialObjectsNode;
    If SpecialObjNode <> Null Then
        Debug.WriteLine("Update contains special object");
    Else
        SpecialObjNode := Update.SpecialObjectsNode;
        SpecialObjNode.ApplyObject(MetabaseSpecialObject.SharedParams) := True;
    End If;
    Update.SaveToFileNF("C:\Update.pefx");
End Sub Main;

After executing the example the global variables are added to the update loaded from the Update.pefx file:

The repeated example execution displays the message in the console:

Update contains special object

See also:

IMetabaseUpdate