VariableDictionary: IRdsDictionary;
VariableDictionary: Prognoz.Platform.Interop.Rds.IRdsDictionary;
The VariableDictionary property returns the dictionary, containing information about metamodel internal variables.
The internal time series database for the metamodel is returned by the IMsMetaModelVisualController.VariableRubricator property.
Executing the example requires a modeling container with the MS identifier containing a metamodel with the META identifier. This metamodel must contain the internal time series database.
Add links to the Metabase, Ms, Ui system assemblies.
Sub VariableDictionary;
Var
mb: IMetabase;
MsObj: IMetabaseObjectDescriptor;
Meta: IMsMetaModel;
MetaVisual: IMsMetaModelVisualController;
Target: IUiCommandTarget;
Begin
mb := MetabaseClass.Active;
MsObj := mb.ItemById("MS");
Meta := mb.ItemByIdNamespace("META", MsObj.Key).Bind As IMsMetaModel;
MetaVisual := Meta.VisualController;
If MetaVisual.HasVariableRubricator Then
Target := WinApplication.Instance.GetObjectTarget(MetaVisual.VariableDictionary As IMetabaseObjectDescriptor);
Target.Execute("Object.Open", Null);
End If;
End Sub VariableDictionary;
Example execution result: the dictionary containing information about internal variables of the META metamodel.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Ms;
Imports Prognoz.Platform.Interop.Ui;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
MsObj: IMetabaseObjectDescriptor;
Meta: IMsMetaModel;
MetaVisual: IMsMetaModelVisualController;
Target: IUiCommandTarget;
Wa: IWinApplicationClass;
Begin
mb := Params.Metabase;
MsObj := mb.ItemById["MS"];
Meta := mb.ItemByIdNamespace["META", MsObj.Key].Bind() As IMsMetaModel;
MetaVisual := Meta.VisualController;
If MetaVisual.HasVariableRubricator Then
Wa := New WinApplicationClassClass();
Target := Wa.Instance[Null].GetObjectTarget(MetaVisual.VariableDictionary As IMetabaseObjectDescriptor);
Target.Execute("Object.Open", Null, Null);
End If;
End Sub;
See also: