Convert(format: MsModelFormat);
Convert(format: Prognoz.Platform.Interop.Ms.MsModelFormat);
format. Required format of internal models.
The Convert method converts internal models of the metamodel to entities which are not repository objects and back.
By default, on creating internal models of the metamodel are not particular repository objects and are located inside metamodel metadata.
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.
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: