IMetabaseUpdateObjectNode.IsUnderUpdateRoot

Syntax

IsUnderUpdateRoot: Boolean;

Description

The IsUnderUpdateRoot property returns whether the update object is located under the IMetabaseUpdate.RootFolder root.

Example

Executing the example requires an update file with the Update.pefx name containing an object with the FOLDER identifier. The form should contain the Button component with the Button1 identifier.

Add a link to the Metabase system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    Update: IMetabaseUpdate;
    Object: IMetabaseUpdateObjectNode;
    Root: IMetabaseUpdateFolderNode;
Begin
    
//Get access to repository
    MB := MetabaseClass.Active;
    
//Create update object
    Update := Mb.CreateUpdate;
    
//Load update from file
    Update.LoadFromFileNF("C:\Update.pefx");
    
//Get object containing file structure
    Root := Update.RootFolder;
    
//Get object with the FOLDER identifier
    Object := Root.FindObject(MB.GetObjectKeyById("FOLDER"));
    
//Display the update object position under the root in the console
    Debug.Write(Object.IsUnderUpdateRoot);
End Sub Button1OnClick;

After executing the example, clicking the button displays the attribute whether the specified update object is located under the IMetabaseUpdate.RootFolder root.

See also:

IMetabaseUpdateObjectNode