Rubricator: IMetabaseObjectDescriptor;
Rubricator: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;
The Rubricator property determines a time series database which stores modeling container data.
Modeling container data can also be stored in the database determined in the IMsModelSpace.Database property.
Executing the example requires that the repository contains a time series database with the TSDB identifier.
Add links to the Metabase, Ms system assemblies.
Sub UserProc;
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
MObj: IMetabaseObject;
Ms: IMsModelSpace;
Begin
// Get repository
MB := MetabaseClass.Active;
// Set basic properties of modeling container
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_MODELSPACE;
CrInfo.Id := mb.GenerateId("MS");
CrInfo.Name := "Modeling container on attributes";
MObj := MB.CreateObject(CrInfo).Edit;
Ms := MObj As IMsModelSpace;
// Specify time series database for data storing
Ms.Rubricator := MB.ItemById("TSDB");
// Set start and end dates of modeling container
Ms.StartDate := DateTime.Parse("1.1.2000");
Ms.EndDate := DateTime.Parse("1.1.2020");
MObj.Save;
End Sub UserProc;
After executing the example the repository contains a created modeling container that uses the TSDB time series database to store data.
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;
CrInfo: IMetabaseObjectCreateInfo;
MObj: IMetabaseObject;
Ms: IMsModelSpace;
Begin
// Get repository
MB := Params.Metabase;
// Set basic properties of modeling container
CrInfo := MB.CreateCreateInfo();
CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_MODELSPACE As integer;
CrInfo.Id := mb.GenerateId("MS", 0);
CrInfo.Name := "Modeling container on attributes";
MObj := MB.CreateObject(CrInfo).Edit();
Ms := MObj As IMsModelSpace;
// Specify time series database for data storing
Ms.Rubricator := MB.ItemById["TSDB"];
// Set start and end dates of modeling container
Ms.StartDate := DateTime.Parse("1.1.2000");
Ms.EndDate := DateTime.Parse("1.1.2020");
MObj.Save();
End Sub;
See also: