IMetabase.CreateUpdate

Syntax

CreateUpdate: IMetabaseUpdate;

Description

The CreateUpdate method creates an update object.

Comments

When an update object is created, the system checks if security subjects have corresponding privilege.

Example

Executing the example requires that the repository contains an assembly with the Assembly_1 identifier. This assembly contains any modules and forms.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    MUpdate: IMetabaseUpdate;
    RootFolder: IMetabaseUpdateFolderNode;
    Node: IMetabaseUpdateObjectNode;
Begin
    Mb := MetabaseClass.Active;
    MUpdate := Mb.CreateUpdate;
    RootFolder := MUpdate.RootFolder;
    Node := RootFolder.Add(MetabaseUpdateNodeType.Object) 
As IMetabaseUpdateObjectNode;
    Node.UpdatePart := MetabaseObjectUpdatePart.DataMetadataSD;
    Node.UpdateType := MetabaseObjectUpdateType.Simple;
    Node.IncludeChildrenDependencies := TriState.OnOption;
    Node.Object := Mb.ItemById(
"Assembly_1").Bind;
    MUpdate.SaveToFileNF(
"C:\Update_1.pefx");
End Sub UserProc;

After executing of the example the new update file with the C:\Update_1.pefx name is created in the root of the C disk. This file contains the Assembly_1 assembly with all its child objects.

See also:

IMetabase