IMsMetaModel.Convert

Fore Syntax

Convert(format: MsModelFormat);

Fore.NET Syntax

Convert(format: Prognoz.Platform.Interop.Ms.MsModelFormat);

Parameters

format. Required format of internal models.

Description

The Convert method converts internal models of the metamodel to entities which are not repository objects and back.

Comments

By default, on creating internal models of the metamodel are not particular repository objects and are located inside metamodel metadata.

Fore Example

Executing the example requires a modeling container with the MS identifier containing a metamodel with the METAMODEL_CONVERT identifier.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    MsKey: Integer;
    Meta: IMsMetaModel;
Begin
    mb := MetabaseClass.Active;
    MsKey := mb.GetObjectKeyById("MS");
    Meta := mb.ItemByIdNamespace("METAMODEL_CONVERT", MsKey).Edit As IMsMetaModel;
    Meta.Convert(MsModelFormat.WithObject);
    (Meta As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, internal models in the METAMODEL_CONVERT metamodel will be converted to the particular repository objects.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    MsKey: uinteger;
    Meta: IMsMetaModel;
Begin
    mb := Params.Metabase;
    MsKey := mb.GetObjectKeyById("MS");
    Meta := mb.ItemByIdNamespace["METAMODEL_CONVERT", MsKey].Edit() As IMsMetaModel;
    Meta.Convert(MsModelFormat.msmfWithObject);
    (Meta As IMetabaseObject).Save();
End Sub;

See also:

IMsMetaModel